Re: [PATCH 07/19] fs: Add freezing handling to mnt_want_write() / mnt_drop_write()

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

 



On Thu, Mar 29, 2012 at 1:43 AM, Jan Kara <jack@xxxxxxx> wrote:
> Most of places where we want freeze protection coincides with the places where
> we also have remount-ro protection. So make mnt_want_write() and
> mnt_drop_write() (and their _file alternative) prevent freezing as well.
> For the few cases that are really interested only in remount-ro protection
> provide new function variants.

The underlying mechanism of mnt_want_write() and sb_start_write() is
basically the same:

 - increment per-CPU counter
 - mb
 - check flag
 - retry loop for races

It is scalable but still there is a non-zero overhead, and duplicating
it doesn't seem to make a lot of sense.  Why not instead try to use a
common abstraction for both?

Then the success case will be common, only the relatively rare failure
case needs to be handled separately.

Thanks,
Miklos
--
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