Re: [PATCH 1/2] quota: Change quotactl_path() systcall to an fd-based one

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

 



On Thu 03-06-21 11:41:02, Sascha Hauer wrote:
> Hello Honza,
> 
> On Wed, Jun 02, 2021 at 05:15:52PM +0200, Jan Kara wrote:
> > Some users have pointed out that path-based syscalls are problematic in
> > some environments and at least directory fd argument and possibly also
> > resolve flags are desirable for such syscalls. Rather than
> > reimplementing all details of pathname lookup and following where it may
> > eventually evolve, let's go for full file descriptor based syscall
> > similar to how ioctl(2) works since the beginning. Managing of quotas
> > isn't performance sensitive so the extra overhead of open does not
> > matter and we are able to consume O_PATH descriptors as well which makes
> > open cheap anyway. Also for frequent operations (such as retrieving
> > usage information for all users) we can reuse single fd and in fact get
> > even better performance as well as avoiding races with possible remounts
> > etc.
> > 
> > Signed-off-by: Jan Kara <jack@xxxxxxx>
> > ---
> >  fs/quota/quota.c                  | 27 ++++++++++++---------------
> >  include/linux/syscalls.h          |  4 ++--
> >  include/uapi/asm-generic/unistd.h |  4 ++--
> >  kernel/sys_ni.c                   |  2 +-
> >  4 files changed, 17 insertions(+), 20 deletions(-)
> 
> Thanks for taking care of this.
> 
> I also gave this some testing and it's working ok for me, so at least I
> can give you my:
> 
> Tested-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Thanks!

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux