Commit 0e82989d authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

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
8118a859 ("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: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 43d8eac4
...@@ -1863,17 +1863,6 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len) ...@@ -1863,17 +1863,6 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
static struct rdev_sysfs_entry rdev_state = static struct rdev_sysfs_entry rdev_state =
__ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store); __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
static ssize_t
super_show(mdk_rdev_t *rdev, char *page)
{
if (rdev->sb_loaded && rdev->sb_size) {
memcpy(page, page_address(rdev->sb_page), rdev->sb_size);
return rdev->sb_size;
} else
return 0;
}
static struct rdev_sysfs_entry rdev_super = __ATTR_RO(super);
static ssize_t static ssize_t
errors_show(mdk_rdev_t *rdev, char *page) errors_show(mdk_rdev_t *rdev, char *page)
{ {
...@@ -2060,7 +2049,6 @@ __ATTR(size, S_IRUGO|S_IWUSR, rdev_size_show, rdev_size_store); ...@@ -2060,7 +2049,6 @@ __ATTR(size, S_IRUGO|S_IWUSR, rdev_size_show, rdev_size_store);
static struct attribute *rdev_default_attrs[] = { static struct attribute *rdev_default_attrs[] = {
&rdev_state.attr, &rdev_state.attr,
&rdev_super.attr,
&rdev_errors.attr, &rdev_errors.attr,
&rdev_slot.attr, &rdev_slot.attr,
&rdev_offset.attr, &rdev_offset.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment