Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1206817

Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers

From Jan Kara <jack@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers
Date 2015-08-13 15:40 +0200
Message-ID <pX0TF-4JG-27@gated-at.bofh.it> (permalink)
References <pWldM-30G-19@gated-at.bofh.it> <pWldM-30G-27@gated-at.bofh.it> <pWXj5-7W6-45@gated-at.bofh.it> <pWXsJ-87z-1@gated-at.bofh.it> <pX0K0-4yj-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu 13-08-15 15:17:44, Oleg Nesterov wrote:
> On 08/13, Jan Kara wrote:
> >
> > On Thu 13-08-15 11:45:52, Jan Kara wrote:
> > > On Tue 11-08-15 19:03:58, Oleg Nesterov wrote:
> > > > Preparation to hide the sb->s_writers internals from xfs and btrfs.
> > > > Add 2 trivial define's they can use rather than play with ->s_writers
> > > > directly. No changes in btrfs/transaction.o and xfs/xfs_aops.o.
> > > >
> > > > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> > >
> > > Looks good. You can add:
> > >
> > > Reviewed-by: Jan Kara <jack@suse.com>
> >
> > One comment when looking at other patches - I'd prefer somewhat better name
> > than __sb_acquire_write().
> 
> Yes, __sb_acquire_write() doesn't look nice and I agree with any
> naming.
> 
> > It doesn't tell that it's only a trylock
> > acquisition. Maybe something like
> 
> But it is not actually "trylock"... This lock was already locked but
> not by us. __sb_release_write + __sb_acquire_write is used to transfer
> the ownership,
>
> > __sb_writers_acquire_nowait()
> >
> > and then
> >
> > __sb_writers_release()?
> 
> so I agree with any naming, I'll update this patch... but perhaps
> __sb_writers_acquire() without "_nowait" make more sense?

OK, drop _nowait - maybe:

__sb_writers_acquired()

(note the additional 'd' at the end) to suggest that we already hold the lock
and only want to tell lockdep about it?

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers Oleg Nesterov <oleg@redhat.com> - 2015-08-11 19:10 +0200
  Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers Jan Kara <jack@suse.cz> - 2015-08-13 11:50 +0200
    Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers Jan Kara <jack@suse.cz> - 2015-08-13 12:00 +0200
      Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers Oleg Nesterov <oleg@redhat.com> - 2015-08-13 15:30 +0200
        Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers Jan Kara <jack@suse.cz> - 2015-08-13 15:40 +0200
          Re: [PATCH v2 1/8] introduce __sb_{acquire,release}_write() helpers Oleg Nesterov <oleg@redhat.com> - 2015-08-13 15:50 +0200

csiph-web