lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 30 Jan 2014 20:42:24 +0100
From:	Jan Kara <jack@...e.cz>
To:	Andreas Dilger <adilger@...ger.ca>
Cc:	Zheng Liu <gnehzuil.liu@...il.com>, Jan Kara <jack@...e.cz>,
	linux-ext4 <linux-ext4@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>, xfs@....sgi.com,
	Theodore Ts'o <tytso@....edu>,
	Dmitry Monakhov <dmonakhov@...nvz.org>,
	Li Xi <pkuelelixi@...il.com>,
	Dave Chinner <david@...morbit.com>, Ben Myers <bpm@....com>
Subject: Re: [RFC] A draft for making ext4 support project quota

On Thu 30-01-14 11:57:10, Andreas Dilger wrote:
> On Jan 28, 2014, at 8:48 PM, Zheng Liu <gnehzuil.liu@...il.com> wrote:
> > On Tue, Jan 28, 2014 at 03:35:14PM +0100, Jan Kara wrote:
> >> On Tue 28-01-14 14:42:49, Zheng Liu wrote:
> >>> For project quota, the key issue is how to handle link(2)/rename(2).  We
> >>> summarize the behaviour in xfs as following.
> >>> 
> >>> *Note*
> >>> + unaccounted dir
> >>> x accounted dir
> >>> 
> >>> link(2)
> >>> -------
> >>> 		+		x
> >>> +		ok		error (EXDEV)
> >>> x		ok		error (EXDEV)
> 
> Presumably this accounted-to-accounted link() is only an error if
> it is between directories of two different projects?
  Yes, I understand it that way.

> >>> rename(2)
> >>> ---------
> >>> 		+		x
> >>> +		ok		ok
> >>> x		wrong		ok
> >> 
> >>  So moving unaccounted file/dir into an accounted dir would be OK? How is
> >> that?
> > 
> > Actually xfs will return EXDEV error when we try to move unaccounted
> > file/dir into an accounted dir.  Then userspace tools (e.g. mv(1)) will
> > use create(2)/read(2)/write(2) syscalls to create these files/dirs from
> > scratch, and get the same id from their parent.
> 
> Why wouldn't renaming an unaccounted file into an accounted directory
> just be implemented by doing the equivalent of chown() to change the
> project ID and setting the quota?  That could avoid a HUGE amount of
> data copying for large files.
  Well, the trouble is not so much with a file but with a directory. If you
move an unaccounted directory in an accounted dir, you would have to
recursively go through it and account each file. That isn't possible to do
reliably from the kernel... And allowing files but disallowing dirs seems
inconsistent so I'm in favor of a simple API.

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ