Re: [PATCH 1/8] quota: Allow to pass mount path to quotactl

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

 



On Wed 27-01-21 15:05:10, Sascha Hauer wrote:
> On Tue, Jan 26, 2021 at 05:18:29PM +0100, Jan Kara wrote:
> > On Tue 26-01-21 13:34:06, Christoph Hellwig wrote:
> > > On Tue, Jan 26, 2021 at 02:17:52PM +0100, Jan Kara wrote:
> > > > Well, I don't think that "wait until unfrozen" is that strange e.g. for
> > > > Q_SETQUOTA - it behaves like setxattr() or any other filesystem
> > > > modification operation. And IMO it is desirable that filesystem freezing is
> > > > transparent for operations like these. For stuff like Q_QUOTAON, I agree
> > > > that returning EBUSY makes sense but then I'm not convinced it's really
> > > > simpler or more useful behavior...
> > > 
> > > If we want it to behave like other syscalls we'll just need to throw in
> > > a mnt_want_write/mnt_drop_write pair.  Than it behaves exactly like other
> > > syscalls.
> > 
> > Right, we could do that. I'd just note that the "wait until unfrozen" and
> > holding of sb->s_umount semaphore is equivalent to
> > mnt_want_write/mnt_drop_write pair. But I agree
> > mnt_want_write/mnt_drop_write is easier to understand and there's no reason
> > not to use it. So I'm for that simplification in the new syscall.
> 
> Due to the user_path_at() to the mountpoint the fs won't go away, so I
> guess for non-exclusive, non-write quota command I don't need any
> additional locking.

They still need s_umount in read mode - to serialize against quotaon /
quotaoff (happening either through quotactl or filesystem remount).

> For non-exclusive, write commands I'll need a
> mnt_want_write/mnt_drop_write pair. What about the exclusive, write
> commands (Q_QUOTAON/Q_QUOTAOFF)?

And these still need s_umount in write mode for similar reasons. So the
only thing you really save is the "wait-for-unfreeze" code.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[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