Re: committing new snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 07, 2009 at 02:25:50PM -0800, Sage Weil wrote:
> When you create a new snap or subvol, first a new ROOT_ITEM is created 
> while everything commits, and then the referring directory entry is set up 
> (with a correspond ROOT_BACKREF).  
> 
> First, if you say 'btrfsctl -s foo .' and then 'reboot -f -n' before the 
> next regularly scheduled commit, the snap is created, but lost.. there's 
> no reference.  Second, the unreferenced ROOT_ITEM is never cleaned up.
> 
> Are there any existing plans for this?  It would be nice if the reference 
> could be committed as well the first time around.  That probably requires 
> a bit of futzing to determine what the root objectid is going to be 
> beforehand, then adding the link in the namespace, then flushing things 
> out and updating the root item in the right order?
> 

We could probably use the orphan code for this.  Just create an orphan item for
the snapshot and then delete it when the snapshot is fully created that way if
somebody does reboot -fn we cleanup the root item and such.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux