Re: [PATCH 1/2] btrfs: Implement DRW lock

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

 



On Thu, Jan 30, 2020 at 03:42:27PM +0200, Nikolay Borisov wrote:
> 
> 
> On 30.01.20 г. 15:41 ч., Christoph Hellwig wrote:
> > On Thu, Jan 30, 2020 at 02:59:41PM +0200, Nikolay Borisov wrote:
> >> A (D)ouble (R)eader (W)riter lock is a locking primitive that allows
> >> to have multiple readers or multiple writers but not multiple readers
> >> and writers holding it concurrently. The code is factored out from
> >> the existing open-coded locking scheme used to exclude pending
> >> snapshots from nocow writers and vice-versa. Current implementation
> >> actually favors Readers (that is snapshot creaters) to writers (nocow
> >> writers of the filesystem).
> > 
> > Any reason not to move it to lib/ under a new option so that other
> > users could reuse it as needed?
> > 
> 
> Yes, I think it's rather specific to btrfs. I don't care honestly if
> there is demand I wouldn't mind.

Ok, just keep it in btrfs for now, we can always move it later.
It just looks like very generic code.



[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