Re: reiser4: FITRIM ioctl -- how to grab the space?

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

 



On Friday 01 August 2014 at 01:19:05, Edward Shishkin wrote:	
> 
> On 08/01/2014 12:16 AM, Ivan Shapovalov wrote:
> > [...]
> > OK. But it still needs to allocate space (even if just to deallocate it
> > shortly), which means that someone could get ENOSPC while the discard is in
> > progress, and this ENOSPC will come from the allocator itself.
> 
> 
> Ah, yes of course, we'll illegally occupy someone's reservation with
> the following oops...
> 
> 
> > Do you have any ideas on how to do it gracefully?
> 
> 
> Define maximal number of allocated blocks in one iteration
> and reserve this amount of blocks at the beginning of each
> iteration. Once the limit is exhausted, stop the scan and
> force to commit the atom.

This sounds pretty hackish... Isn't there a way to grab all possible space
at the same time?
By all possible space I mean (sbinfo->block_count - sbinfo->blocks_used),
so that `fstrim <mountpoint>` will be efficient even if system is under load
and atoms are being created continuously.

Or am I trying to over-engineer too much?

Thanks,
-- 
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