Re: [RFC] [PATCHv3 7/9] reiser4: batch discard support: actually implement the FITRIM ioctl handler.

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

 



On Tuesday 21 October 2014 at 18:33:11, Edward Shishkin wrote:	
> On 10/21/2014 06:23 PM, Ivan Shapovalov wrote:
> > On Tuesday 21 October 2014 at 18:21:56, Edward Shishkin wrote:	
> >> [...]
> >>
> >> Sorry, but I don't see any explanation.
> > "given a filesystem with (5% + eps) free space left, not using the reserved
> > space will result in trimming of (eps) blocks at a time."
> >
> 
> 
> This is something that I am not able to parse :)
> 
> Ok, it is clear, why we can not fail with -ENOSPC when trying to delete
> a file from a full partition, yes?

Sure. Please note that making reiser4_trim_fs's allocations BA_RESERVED will
not hinder this: delete_mutex is there for a reason.

> I want to see explanation, why FITRIM ioclt can not finish the work when
> there is no free space on disk.

Suppose we do not use reserved space for reiser4_trim_fs's allocations.
Let's analyze those two cases:

1. There is <= 5% free space on disk.
Initial grabbing fails, nothing can be trimmed.
This is wrong.

2. There is 5% + X (where X is some small number) free space on disk.
We can grab only X blocks at a time, so a total of ((SIZE * 5% / X) + 1)
transactions will be created. BTW, if X < erase unit, nothing can be trimmed.
This is ineffective.

Hope this makes sense.

-- 
Ivan Shapovalov / intelfx /

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux