• Toshi Kani's avatar
    block: Add bdev_dax_supported() for dax mount checks · 2d96afc8
    Toshi Kani authored
    DAX imposes additional requirements to a device.  Add
    bdev_dax_supported() which performs all the precondition checks
    necessary for filesystem to mount the device with dax option.
    
    Also add a new check to verify if a partition is aligned by 4KB.
    When a partition is unaligned, any dax read/write access fails,
    except for metadata update.
    Signed-off-by: default avatarToshi Kani <toshi.kani@hpe.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Jens Axboe <axboe@fb.com>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Cc: Andreas Dilger <adilger.kernel@dilger.ca>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Dave Chinner <david@fromorbit.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Boaz Harrosh <boaz@plexistor.com>
    Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
    2d96afc8
block_dev.c 49.8 KB