]> git.baikalelectronics.ru Git - kernel.git/commit
block: hide badblocks attribute by default
authorDan Williams <dan.j.williams@intel.com>
Thu, 27 Apr 2017 21:46:26 +0000 (14:46 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 28 Apr 2017 14:26:42 +0000 (08:26 -0600)
commit965990e1248744ab07f9d768a008b1d5fdbeae1f
tree4586260c54677fd672f9fe438d43a85ba5d98000
parent7f003c53f99fcc9596b2fd6ae668929fcda6ad83
block: hide badblocks attribute by default

Commit 2c2db7df64ff "block: Add badblock management for gendisks"
allowed for drivers like pmem and software-raid to advertise a list of
bad media areas. However, it inadvertently added a 'badblocks' to all
block devices. Lets clean this up by having the 'badblocks' attribute
not be visible when the driver has not populated a 'struct badblocks'
instance in the gendisk.

Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/genhd.c