Re: [PATCH 0/5] FAT errors, user space notifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Denis Karpov <ext-denis.2.karpov@xxxxxxxxx> writes:

> 1. Options for FAT file system behavior on errors (continue, panic, 
>    remount r/o)
>
>    Current FAT behavior is to remount itself read-only on critical errors.
>    Quite often this causes more harm to user space applications than if the
>    error would be ignored - file system suddenly becoming r/o leads to all 
>    kind of surprises from applications (yes, I know applications should be
>    written properly, this is not always the case). 
>
>    'errors' mount option (equivalent to the one in 
>    ext2 fs) offers possibility for user space to specify the desired behavior.
>    Default behavior is still as it was: remount read-only.
>    [PATCH 1]

I can't see why more harm with r/o though, this would be useful for some
people. Please see the comment to this patch.

> 2. Generic mechanism for notifications of user space about file system's 
>    errors/inconsistency on a particular partition using:
>
>      - sysfs entry /sys/block/<bdev>/<part>/fs_unclean
>      - uevent KOBJ_CHANGE, uevent's environment variable FS_UNCLEAN=[0:1]
>
>    User space might want to monitor these notifications (poll2() on sysfs
>    file or udevd's rule for uevent) and fix the fs damage.
>    File system can be marked clean again by writing '0' to the corresponding 
>    'fs_unclean' sysfs file.
>
>    Reason for this feature: doing full scale fsck on a file system 
>    at mounting time (especially residing on a slow and error prone media 
>    such as flash) takes long. Full fsck results e.g. in slow boot times.
>    Alternative approach is to run limited fsck (or none at all) at 
>    mounting/boot time. At run-rime if an fs error is encountered, notify 
>    the user space and expect it to fix the file system.
>    [PATCH 2]

This means you are assuming the fs driver can detect all kind of
corruption?  It is not true. Mounting corrupted fs is dangerous, and the
fs driver might corrupt the another part of fs silently. (e.g. corrupted
pointer to object wouldn't be detected usually. etc.)

Or, limited check and repair on userspace, and other check is going into
fs driver?

> 3. Make FAT and EXT2 file systems use the above mechanism to optionally 
>    notify user space about errors. Implemented as 'notify' mount option.
>    FAT error reporting facilities had to be re-factored in order to 
>    simplify sending error notifications.
>    [PATCH 3,4,5]

Thanks.
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux