From: Douglas Gilbert <dgilbert@interlog.com>
To: Christoph Hellwig <hch@lst.de>
Cc: SCSI development list <linux-scsi@vger.kernel.org>,
James Bottomley <james.bottomley@hansenpartnership.com>,
Hannes Reinecke <hare@suse.de>, vaughan <vaughan.cao@oracle.com>
Subject: Re: [PATCH v4] sg: O_EXCL and other lock handling
Date: Fri, 13 Jun 2014 10:33:37 -0400 [thread overview]
Message-ID: <539B0BC1.2020303@interlog.com> (raw)
In-Reply-To: <20140613090316.GA18032@lst.de>
On 14-06-13 05:03 AM, Christoph Hellwig wrote:
> Hi Doug,
>
> this looks generally good to me, but I don't think open_cnt and exclude
> have to use atomic_t, as they are only ever modified under open_rel_lock.
They are read by 'cat /proc/scsi/sg/debug' [in
sg_proc_seq_show_debug()] but transient off-by-1 reports
are not so important. [Prior to locking that block with
read_lock(sfd_lock) that routine sometimes printed wild
results, so some care is required.]
> Can you take a look at the version below? This changes open_cnt to an
> int, exclude to a bool, removes the open_cnt underflow check that
> the VFS takes care for, and streamlines the open path a little bit:
sg_open() and sg_release() clean-up looks good. The
back-up goto at the end of sg_open() reminds me of
Fortran style :-) More importantly my sg_tst_excl*
tests give this version the thumbs up.
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
next prev parent reply other threads:[~2014-06-13 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 0:26 [PATCH v4] sg: O_EXCL and other lock handling Douglas Gilbert
2014-06-13 9:03 ` Christoph Hellwig
2014-06-13 14:33 ` Douglas Gilbert [this message]
2014-06-16 13:45 ` Christoph Hellwig
2014-06-13 20:18 ` Douglas Gilbert
2014-06-21 11:01 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539B0BC1.2020303@interlog.com \
--to=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=vaughan.cao@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox