Re: Purpose of block reserves

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

 



Arne Jansen wrote:
> 
> while reading btrfs source code, I try to make sense of the various uses
> of block reserves. The working theory is as follows:

Since there have been no protests, I added this information to the wiki, section
"Code documentation".

--
Arne

> 
> 1. Every operation has to reserve upfront every single byte it needs to
>    complete its operation fully.
> 2. If an operation cannot determine how much space it will need, it has
>    to be able to cope with running out of space. Normally it does it by
>    inserting an orphan item, doing its work in multiple transactions and
>    removing the orphan item. The commits in between normally free up enough
>    space to continue the operation.
> 3. All other enospc situations are errors in program logic and should result
>    in BUG_ON.
> 
> It would be great of someone with a deeper knowledge could correct, expand
> or just confirm this.
> 
> Thanks,
> Arne
> --
--
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