xfs
[Top] [All Lists]

Re: XFS_IOC_SET_RESBLKS and quota

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: XFS_IOC_SET_RESBLKS and quota
From: Steve Lord <lord@xxxxxxx>
Date: Mon, 21 May 2001 10:12:17 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Message from Andi Kleen <ak@suse.de> of "Mon, 21 May 2001 16:49:14 +0200." <20010521164914.A9376@gruyere.muc.suse.de>
Sender: owner-linux-xfs@xxxxxxxxxxx
> 
> The interaction between XFS_IOC_SET_RESBLKS and quotas seems to be very 
> strange. It doesn't check the current user quota when allowing reserves
> (so you can set arbitarily high values), but when you try to write to the
> reserved file after the big reservation it doesn't allow any writes even
> when the user is really not out of quota.
> 
> 
> -Andi
> 

Hmmm, that call looks like it needs some more security on it, it was
added for data migration (dmapi), and has nothing to do with actual file data.
Basically data migration has a problem in that it needs to be able to
migrate a file out to tape from a completely full filesystem, moving
the data involves writing an extended attribute to say where it has
gone, and this can require space. So this call was added to steal some
space from the superblock and it is only supposed to be used for a
special user space application. I think it needs at least this added
to it:

                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;

Steve



<Prev in Thread] Current Thread [Next in Thread>