Re: [PATCH] [RFC] bcachefs: SIX locks (shared/intent/exclusive)

2018-05-21 Thread Kent Overstreet
On Mon, May 21, 2018 at 08:04:16PM -0700, Matthew Wilcox wrote: > On Mon, May 21, 2018 at 10:19:51PM -0400, Kent Overstreet wrote: > > New lock for bcachefs, like read/write locks but with a third state, > > intent. > > > > Intent locks conflict with each other, but not with read locks; taking a >

Re: [PATCH] [RFC] bcachefs: SIX locks (shared/intent/exclusive)

2018-05-21 Thread Matthew Wilcox
On Mon, May 21, 2018 at 10:19:51PM -0400, Kent Overstreet wrote: > New lock for bcachefs, like read/write locks but with a third state, > intent. > > Intent locks conflict with each other, but not with read locks; taking a > write lock requires first holding an intent lock. Can you put something

[PATCH] [RFC] bcachefs: SIX locks (shared/intent/exclusive)

2018-05-21 Thread Kent Overstreet
New lock for bcachefs, like read/write locks but with a third state, intent. Intent locks conflict with each other, but not with read locks; taking a write lock requires first holding an intent lock. The purpose is for multi node data structures (i.e. btrees), where if we were using read/write lo