On Fri, Feb 03, 2017 at 09:05:01AM +0200, Amir Goldstein wrote: > > I have a naive question about generic implementation: > We already have mnt_want_write() hooks in generic vfs code, > so it should be easy enough to set the shutdown bit on sb and return -EIO there. > Wouldn't it be better to add mnt_want_read() hooks in vfs helpers > instead of duplicating > the fs specific hooks? I hear f2fs is yet another potential customer?? There are *portions* of shutdown functionality which could be done in the generic VFS code. The checks to have various system calls return early, and to have writeback skipped for inodes belonging to that file system, could be done in the generic code, sure. But the code to shutdown or abort the journal would always have to be fs specific, for example. - Ted