From: Stelian P. <st...@po...> - 2008-05-28 12:46:31
|
Le mercredi 28 mai 2008 à 12:00 +0200, Stelian Pop a écrit : > This means that the duplicates appear only in some cases. For > example, if an x count for 8kb, a and b are inodes, A and B are the > extended attributes of a and b): > > xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx > aaaaaaaA Abbbbbbb bbbbBcCd dddddddD > > QFA: ^ ^ ^ ^ > > In the example above, only b/B will generate duplicates. > > The simplest way to correct this would be to modify dump in order to > forbid the creation of QFA positions for EAs, only for real inodes. But > I need to think a bit if there isn't something we can do to cope with > those duplicates in restore (to handle QFA files generated by an older > version of dump). > > Let me think a bit about this and I'll propose you a patch. On a second thought, this doesn't look like it's feasible. For the example above, I could modify restore so to use the second QFA position instead of the third. But there will still be a problem with the forth position, if you want to restore 'd/D'. We could modify restore so that the search for a QFA position will return the position of the previous inode (so a search for b/B will return the first mark, a search for d/D will return the third mark etc), but this makes the whole QFA feature less precise: in the case you have a big file before the file you want to restore, you will not be able to position the tape on the needed file, but on the precedent one, and wait for the tape to advance until the needed one. So I guess the best way is still to make the change in dump, and wait for people to upgrade. See the patch below. Comments ? Index: dump/tape.c =================================================================== RCS file: /cvsroot/dump/dump/dump/tape.c,v retrieving revision 1.89 diff -u -r1.89 tape.c --- dump/tape.c 20 Aug 2005 21:00:48 -0000 1.89 +++ dump/tape.c 28 May 2008 12:45:52 -0000 @@ -1310,7 +1310,8 @@ if ((spclptr->c_magic == NFS_MAGIC) && (spclptr->c_type == TS_INODE) && (spclptr->c_date == gThisDumpDate) && - !(spclptr->c_dinode.di_mode & S_IFDIR) + !(spclptr->c_dinode.di_mode & S_IFDIR) && + !(spclptr->c_flags & DR_EXTATTRIBUTES) ) { foundone = 1; /* if (cntntrecs >= maxntrecs) { only write every maxntrecs amount of data */ -- Stelian Pop <st...@po...> |