aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-03-19 20:00:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 21:53:35 -0400
commit0e82989d95cc46cc58622381eafa54f7428ee679 (patch)
treebbf94838940302b2e4683c224cd5c6d176b658ff /drivers/md/md.c
parent43d8eac44f28d384d2377dcdd1407f51f79dda55 (diff)
md: remove the 'super' sysfs attribute from devices in an 'md' array
Exposing the binary blob which is the md 'super-block' via sysfs doesn't really fit with the whole sysfs model, and ever since commit 8118a859dc7abd873193986c77a8d9bdb877adc8 ("sysfs: fix off-by-one error in fill_read_buffer()") it doesn't actually work at all (as the size of the blob is often one page). (akpm: as in, fs/sysfs/file.c:fill_read_buffer() goes BUG) So just remove it altogether. It isn't really useful. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ccbbf63727cc..61ccbd2683fa 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1864,17 +1864,6 @@ static struct rdev_sysfs_entry rdev_state =
1864__ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store); 1864__ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
1865 1865
1866static ssize_t 1866static ssize_t
1867super_show(mdk_rdev_t *rdev, char *page)
1868{
1869 if (rdev->sb_loaded && rdev->sb_size) {
1870 memcpy(page, page_address(rdev->sb_page), rdev->sb_size);
1871 return rdev->sb_size;
1872 } else
1873 return 0;
1874}
1875static struct rdev_sysfs_entry rdev_super = __ATTR_RO(super);
1876
1877static ssize_t
1878errors_show(mdk_rdev_t *rdev, char *page) 1867errors_show(mdk_rdev_t *rdev, char *page)
1879{ 1868{
1880 return sprintf(page, "%d\n", atomic_read(&rdev->corrected_errors)); 1869 return sprintf(page, "%d\n", atomic_read(&rdev->corrected_errors));
@@ -2060,7 +2049,6 @@ __ATTR(size, S_IRUGO|S_IWUSR, rdev_size_show, rdev_size_store);
2060 2049
2061static struct attribute *rdev_default_attrs[] = { 2050static struct attribute *rdev_default_attrs[] = {
2062 &rdev_state.attr, 2051 &rdev_state.attr,
2063 &rdev_super.attr,
2064 &rdev_errors.attr, 2052 &rdev_errors.attr,
2065 &rdev_slot.attr, 2053 &rdev_slot.attr,
2066 &rdev_offset.attr, 2054 &rdev_offset.attr,