Re: Disk space accounting and subvolume delete

2010-05-31 Thread Bruce Guenter
On Wed, May 12, 2010 at 01:02:07PM +0800, Yan, Zheng wrote: Dropping a tree can be lengthy. It's not good to let sync wait for hours. For most linux FS, 'sync' just force an transaction/journal commit. I don't think they wait for large operations that can span multiple transactions to

Re: Disk space accounting and subvolume delete

2010-05-31 Thread Mike Fedyk
On Mon, May 31, 2010 at 12:01 PM, Bruce Guenter br...@untroubled.org wrote: On Wed, May 12, 2010 at 01:02:07PM +0800, Yan, Zheng  wrote: Dropping a tree can be lengthy. It's not good to let sync wait for hours. For most linux FS, 'sync' just force an transaction/journal commit. I don't think

Re: Disk space accounting and subvolume delete

2010-05-31 Thread Yan, Zheng
On Tue, Jun 1, 2010 at 3:01 AM, Bruce Guenter br...@untroubled.org wrote: On Wed, May 12, 2010 at 01:02:07PM +0800, Yan, Zheng  wrote: Dropping a tree can be lengthy. It's not good to let sync wait for hours. For most linux FS, 'sync' just force an transaction/journal commit. I don't think

Re: Disk space accounting and subvolume delete

2010-05-12 Thread Mike Fleetwood
On 12 May 2010 06:02, Yan, Zheng yanzh...@21cn.com wrote: On Tue, May 11, 2010 at 11:45 PM, Bruce Guenter br...@untroubled.org wrote: On Tue, May 11, 2010 at 08:10:38AM +0800, Yan, Zheng  wrote: This is because the snapshot deleting ioctl only removes the a link. Right, I understand that.  

Re: Disk space accounting and subvolume delete

2010-05-11 Thread Yan, Zheng
On Tue, May 11, 2010 at 11:45 PM, Bruce Guenter br...@untroubled.org wrote: On Tue, May 11, 2010 at 08:10:38AM +0800, Yan, Zheng  wrote: This is because the snapshot deleting ioctl only removes the a link. Right, I understand that.  That part is not unexpected, as it works just like unlink

Re: Disk space accounting and subvolume delete

2010-05-10 Thread Josef Bacik
On Mon, May 10, 2010 at 12:23:52PM -0600, Bruce Guenter wrote: Hi. When deleting a snapshot, I have observed that the disk space used by that snapshot is not immediately released (according to statvfs or df). Neither sync nor btrfs filesystem sync releases the disk space neither. The only