All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: device-mapper development <dm-devel@redhat.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Mike Snitzer <snitzer@redhat.com>,
	jaxboe@fusionio.com, roland@purestorage.com,
	Al Viro <viro@zeniv.linux.org.uk>,
	"Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: [PATCH v2] dm mpath: maintain reference count for underlying devices
Date: Tue, 20 Sep 2011 20:31:34 +0900	[thread overview]
Message-ID: <4E787996.6050507@ce.jp.nec.com> (raw)
In-Reply-To: <1316502834.2971.7.camel@dabdike>

Hi James,

On 09/20/11 16:13, James Bottomley wrote:
>> James's suggestion was to fix b) by not freeing elevator
>> until blk_release_queue() is called:
>>   https://lkml.org/lkml/2011/8/10/421
>> But it would hit the same issue that there's no guarantee
>> of q->queue_lock validity after blk_cleanup_queue().
>> James's other suggestion was to add a callback mechanism
>> for driver to free q->queue_lock.
> 
> Actually, there isn't a problem with this patch:  Any driver that
> expects blk_cleanup_queue to guarantee last use of the lock has to call
> it as the last releaser.  If it doesn't, it would oops (or would have
> oopsed before we started putting the block guards in).

'q->sysfs_lock' seems to protect the queue access via sysfs.
Are you sure it never delay the last put?

The separation of blk_cleanup_queue() and blk_release_queue()
was introduced with the following commit:

  commit 483f4afc421435b7cfe5e88f74eea0b73a476d75
  Author: Al Viro <viro@zeniv.linux.org.uk>
  Date:   Sat Mar 18 18:34:37 2006 -0500
  [PATCH] fix sysfs interaction and lifetime rules handling for queues

I added Al to Cc hoping he knows why elevator_exit() was
placed in blk_cleanup_queue() from the first time.

Other than the above concern, I have no objection to your patch.

>> I was trying to fix a) in the following thread:
>>   https://lkml.org/lkml/2011/8/18/103
>> but haven't gotten response from James so it seems rejected.
> 
> I think I said quite a few times that this would reintroduce the oops I
> was trying to fix.  Alan seems to think that there are sufficient guards
> just to move the blk_cleanup_queue(), but I'd prefer to get
> blk_cleanup_queue() working properly like the del method it's supposed
> to be.

I think you haven't mentioned what oops would be reintroduced.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation

  reply	other threads:[~2011-09-20 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16 13:59 [PATCH v2] dm mpath: maintain reference count for underlying devices Mike Snitzer
2011-09-19  6:49 ` Jun'ichi Nomura
2011-09-19 14:34   ` Mike Snitzer
2011-09-20  5:29     ` Jun'ichi Nomura
2011-09-20  7:13       ` James Bottomley
2011-09-20 11:31         ` Jun'ichi Nomura [this message]
2011-10-17 20:15       ` Mike Snitzer
2011-10-18 13:00         ` Jun'ichi Nomura

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=4E787996.6050507@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=jaxboe@fusionio.com \
    --cc=martin.petersen@oracle.com \
    --cc=roland@purestorage.com \
    --cc=snitzer@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.