xfs
[Top] [All Lists]

Re: DMAPI and dump/restore

To: Dean Roehrich <roehrich@xxxxxxx>
Subject: Re: DMAPI and dump/restore
From: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Jul 2001 15:47:14 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <200107101612.LAA22148@xxxxxxxxxxxxxxxxxxxxxxxx>; from roehrich@xxxxxxx on Tue, Jul 10, 2001 at 11:12:26AM -0500
References: <200107101612.LAA22148@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Dean,

On Tue, Jul 10, 2001 at 11:12:26AM -0500, Dean Roehrich wrote:
> 
> xfsdump has to know how to unpack DMF's extended attributes so it can figure
> out if the file is online or offline, and do the intelligent thing when doing
> the backup.  Other HSM's pack their extended attributes in different ways, and
> the XDSM (DMAPI) spec doesn't say the attributes have to be structured any
> particular way.
> 
> Our DMAPI--and our HSM--does not yet support multiple managed regions, so
> xfsdump just has to figure out if the file, as a whole, is online or offline.
> So when you're reading xfsdump/restore code you're not going to find the stuff
> that punches holes whereever there's an offline region.
> 
> So if you're on Irix and using an HSM other than DMF on an XFS filesystem then
> xfsdump is not going to do the right thing.
> 
So, in other words, we only handle stuff for DMF.
And this should work in Linux for DMF when we turn it on in 
xfsdump/xfsrestore and finish the necessary porting
(or so the theory goes :).

> 
> >> 2. What do xfsdump/xfsrestore do with DM attributes, regions, and event
> >> lists?  Are they stored, ignored, or something else?
> >> 
> >I presumed all the DMAPI event stuff and other related data is
> >in extended attributes. And all the extended attributes are
> >dumped out (unless the -A option is used).
> 
> A couple of masks are in the inode: io_dmevmask/di_dmevmask and
> io_dmstate/di_dmstate.  Any HSM using our DMAPI will rely on dmevmask and will
> build with /usr/include/xfs/dmapi.h to get the mask bits.
> 
> The dmstate field is not used and the purpose for its presence in our inode,
> and any possible meaning it may have, is a piece of lost history.  It's not
> part of the DMAPI spec.  However, it's a couple of bits we own in the inode
> and we're reserving them.  
>
> I noticed that on the Linux side xfsdump sets it to
> zero--the Irix xfsdump doesn't touch it.  The confusion is not surprising, I
> guess.
What bits of the code are you looking at here ?

> >Hmmmm....xfsrestore takes the -D option to restore DMAPI event
> >settings. If F_FSSETDM macro is set then it uses fcntl(F_FSSETDM).
> >All this code is #ifdef'ed out by the macro F_FSSETDM.
> >This doesn't seem to be turned on in IRIX or Linux.
> >Dean, is it not necessary to call fcntl(F_FSSETDM) ?
> 
> It is turned on in Irix.  The makefile defines BANYAN unconditionally (found
> only in the Irix-side code), and F_FSSETDM is defined in <sys/fcntl.h>--so
> that code is enabled on Irix.  
Oops. I missed this.

> The stuff inside the #ifdef F_FSSETDM will have
> to be ported to use the XFS_IOC_FSSETDM ioctl on Linux.
Ok.

Thanks,
Tim.


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