git: sys/dev/disk/dm: Don't implement "status" as a subset of "table" [1/2]

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Mon Oct 19 07:12:34 PDT 2015


commit f134a703d59cab7791ead3eb7f5e77038dbae4dc
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Oct 19 21:36:16 2015 +0900

    sys/dev/disk/dm: Don't implement "status" as a subset of "table" [1/2]
    
    DragonFly's (and NetBSD's) dm implements "status" and "table"
    of dmsetup(8) using the same handler dm_table_status_ioctl(),
    and sees "status" as a subset of "table", however this is wrong.
    
    Linux dm implements these two as different subcommands, so
    the way these two are implemented in BSDs breaks compatibility
    with Linux dm.
    
    Actually it has never broke compatibility with Linux dm until
    dm-delay target was added, because targets that were available
    till then happened to have a blank "status" implementation,
    which ended up being a subset of "table". This is not the case
    with dm-delay target in Linux with different implmentation for
    each, and this commit is to maintain the compatibility with Linux.

Summary of changes:
 sys/dev/disk/dm/dm.h                            |  3 ++-
 sys/dev/disk/dm/dm_ioctl.c                      | 18 +++++++++++-------
 sys/dev/disk/dm/targets/delay/dm_target_delay.c | 17 +++++++++++++++++
 3 files changed, 30 insertions(+), 8 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list