• Eric Sandeen's avatar
    xfs: allow individual quota grace period extension · df42ce64
    Eric Sandeen authored
    The only grace period which can be set in the kernel today is for id 0,
    i.e. the default grace period for all users.  However, setting an
    individual grace period is useful; for example:
    
     Alice has a soft quota of 100 inodes, and a hard quota of 200 inodes
     Alice uses 150 inodes, and enters a short grace period
     Alice really needs to use those 150 inodes past the grace period
     The administrator extends Alice's grace period until next Monday
    
    vfs quota users such as ext4 can do this today, with setquota -T
    
    To enable this for XFS, we simply move the timelimit assignment out
    from under the (id == 0) test.  Default setting remains under (id == 0).
    Note that this now is consistent with how we set warnings.
    
    (Userspace requires updates to enable this as well; xfs_quota needs to
    parse new options, and setquota needs to set appropriate field flags.)
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    df42ce64
xfs_qm_syscalls.c 20.7 KB