Skip to contentSkip to conversation

md: Remove the 'super' sysfs attribute from devices in an 'md' array.

PATCH New NeilBrown 1 participant 1 message Mar 14, 2008 1 message not in the archive MD RAID

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20080314153739.11056.patches@notabene

NeilBrown

author
#1 lore raw

PATCH 1/1 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 sysfs model, and since commit
8118a859dc7abd873193986c77a8d9bdb877adc8
it doesn't actually work at all (as the size of the blob is often one page).

So just remove it altogether. It isn't really useful.

### Diffstat output

 ./drivers/md/md.c |   12 ------------
 1 file changed, 12 deletions(-)
drivers/md/md.c +0 -12
diff .prev/drivers/md/md.c ./drivers/md/md.c
@@ -1864,17 +1864,6 @@ static struct rdev_sysfs_entry rdev_stat
 __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
 errors_show(mdk_rdev_t *rdev, char *page)
 {
 	return sprintf(page, "%d\n", atomic_read(&rdev->corrected_errors));
@@ -2060,7 +2049,6 @@ __ATTR(size, S_IRUGO|S_IWUSR, rdev_size_
 
 static struct attribute *rdev_default_attrs[] = {
 	&rdev_state.attr,
-	&rdev_super.attr,
 	&rdev_errors.attr,
 	&rdev_slot.attr,
 	&rdev_offset.attr,