Re: [RFC PATCH] ext4: add link file support for {GET,SET}XATTR ioctl

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

 



On Thu, Jan 31, 2019 at 10:47:12AM +0900, Wang Shilong wrote:
> From: Wang Shilong <wshilong@xxxxxxx>
> 
> Currently there is no way to change project ID of
> symlink file itself, this is important to implement
> Directory quota for an existed directory.

This seems like something open(O_PATH|O_NOFOLLOW) should allow.
from open(2):

	If pathname is a symbolic link and the O_NOFOLLOW flag is
	also specified, then the call returns a file  descriptor
	referring  to  the symbolic  link.  This  file  descriptor
	can  be used as the dirfd argument in calls to fchownat(2),
	fstatat(2), linkat(2), and read¿ linkat(2) with an empty
	pathname to have the calls operate on the symbolic link.

Changing the project id is the equivalent of fchownat().....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux