On Mon, Feb 09, 2004 at 12:35:02PM -0600, Dean Roehrich wrote:
> >From: Nathan Scott <nathans@xxxxxxx>
> >I believe SGIs HSM uses the XFS RESBLKS interface to reserve a set
> >amount of filesystem space, which is only available when allocating
> >extended attribute space for the root namespace (where the DMAPI
> >attributes reside).
> Yes. Mentioned briefly in the xfs(5) manpage.
> Dunno if this works, but here's how it might be done...
> xfs_fsop_resblks_t counts;
> fd = open(device, ...);
(not the block device, the ioctl needs to get into XFS.)
> counts.resblks = 100; /* experiment with it */
> ioctl(fd, XFS_IOC_SET_RESBLKS, &counts);
> I believe you have to do that everytime you mount the filesystem.
Yes; there is also an xfs_io(8) interface for this - just point
it at the mount point or a file in the filesystem, and you can
get & set this value (and see available reserved space too). I
played with making this a more generic interface once, to allow
root to have access to an extra chunk of space for allocations,
like other fs's do. But I didn't get around to tidying it up,
testing it properly, etc (& the patch is long since lost before
someone asks for it ;) - but it wasn't too difficult iirc).