xfs
[Top] [All Lists]

Re: XFS shrink functionality

To: David Chinner <dgc@xxxxxxx>
Subject: Re: XFS shrink functionality
From: Ruben Porras <nahoo82@xxxxxxxxx>
Date: Thu, 14 Jun 2007 10:35:27 +0200
Cc: xfs@xxxxxxxxxxx, cw@xxxxxxxx, iusty@xxxxxxxxx
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=N8HtVFhQVOiXbOFFocJk5u0l4/KFSFtDxjLYkLqCyTuDoElrnuUuiBC5TOOGvSSliA8OIJCgzPLUyi5hsTkWW4NtaEi/2mGjjk/NrEkRIc/uHaJIs1wWFUrqSq3gLITTbZCJQk4XsK6eEk3EQgymhjmYzVvsJ7QWm81NxevEuPc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=s3ctva87Lfod4r/ug+fbckmwN5cB9AhNUS0BBuXADjVjTTPnrIs15ro+y0hNueb+I1lMk4uVZ2558OFbwiP+bl9Qo5o7DZnwTxtDPp/RORhKb8WMjHNlXk91fpPk2zpjxAaoXqgLM9accRUhEog8l0/v/aw8MpSxPEIAYflgIoY=
In-reply-to: <20070608151223.GF86004887@sgi.com>
References: <1180715974.10796.46.camel@localhost> <20070604001632.GA86004887@sgi.com> <20070604084154.GA8273@teal.hq.k1024.org> <1181291033.7510.40.camel@localhost> <20070608101532.GA18788@teal.hq.k1024.org> <20070608151223.GF86004887@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
> > I took a look at both items since this discussion started. And honestly,
> > I think 1) is harder that 4), so you're welcome to work on it :) The
> > points that make it harder is that, per David's suggestion, there needs
> > to be:
> >  - define two new transaction types
> 
> one new transaction type:
> 
> XFS_TRANS_AGF_FLAGS

done

> and and extension to xfs_alloc_log_agf(). Is about all that is
> needed there.

still to do. Will come after the ioctls.

> See the patch here:
> 
> http://oss.sgi.com/archives/xfs/2007-04/msg00103.html
> 
> For an example of a very simlar transaction to what is needed
> (look at xfs_log_sbcount()) and very similar addition to
> the AGF (xfs_btreeblks).
> 
> >  - define two new ioctls
> 
> XFS_IOC_ALLOC_ALLOW_AG, parameter xfsagnumber_t.
> XFS_IOC_ALLOC_DENY_AG, parameter xfsagnumber_t.

almost done. How I'm should I obtain a pointer to an xfs_agf_t from
inside the ioctls?

I guess that the first step is to get a *bp with xfs_getsb and then an *sbp,
but, which function/macro gives me the xfs_agf_t pointer? Sorry, I can't
find the way greeping through the code.

> >  - update the ondisk-format (!), if we want persistence of these flags;
> >    luckily, there are two spare fields in the AGF structure.
> 
> Better to expand, I think. The AGF is a sector in length - we can
> expand the structure as we need to this size without fear, esp. as
> the part of the sector outside the structure is guaranteed to be
> zero.  i.e. we can add a fields flag to the end of the AGF
> structure - old filesystems simple read as "no flags set" and
> old kernels never look at those bits....

done.

> >  - check the list of allocation functions that allocate space from the
> >    AG

still to be done.

Thaks again for the help.

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

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