2002-06-05 06:18:14

by Borsenkow Andrej

[permalink] [raw]
Subject: How safe is to add a member to struct super_block?

There is a problem in media revalidation in current supermount - if
something tries to access device after media change before supermount (a
reported case was - close tray manually and do eject -t) a "media change"
flag is lost so supermount never remounts underlying fs.

The simplest way to fix it is to unmount filesystem in check_media_change
(actually in destroy_device where we get superblock). But this needs both a
"this fs is supermounted" flag and pointer to top-level fs so supermount can
properly clean up. So I intend to add a member to struct super_block that
points to super block of top-level (supermount) fs.

Are there any alignment/size constraints on struct super_block to be aware
of?

TIA

-andrej