git: sys/dev/disk/dm: Don't define target specific defs in dm.h

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Oct 10 05:46:04 PDT 2015


commit f3ef812beaa0c3135ecba9fda85c11465cd3ac4a
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sat Oct 3 16:29:22 2015 +0900

    sys/dev/disk/dm: Don't define target specific defs in dm.h
    
    dm targets should not have target local structures, function
    prototypes, etc in dm.h which is a header for dm core.
    It has no dependency on a certain dm target, and works with
    or without a certain dm target.
    
    Targets local structures are usually private data part of dm,
    and target local functions are called via pointers. dm core
    doesn't recognize these by names or types.
    
    NetBSD had (and still has) it this way, but this change will
    not make it any difficult to sync with NetBSD in the future
    since NetBSD also isn't likely to use them in dm core by its
    design. They're just defined there.

Summary of changes:
 sys/dev/disk/dm/dm.h                               | 70 ----------------------
 sys/dev/disk/dm/targets/linear/dm_target_linear.c  |  5 ++
 sys/dev/disk/dm/targets/mirror/dm_target_mirror.c  | 19 ++++++
 .../disk/dm/targets/snapshot/dm_target_snapshot.c  | 28 +++++++++
 .../disk/dm/targets/striped/dm_target_striped.c    | 13 ++++
 5 files changed, 65 insertions(+), 70 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f3ef812beaa0c3135ecba9fda85c11465cd3ac4a


-- 
DragonFly BSD source repository


More information about the Commits mailing list