From: Alasdair G Kergon <agk@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [dm-devel] [PATCH] dm: noflush resizing (0/3)
Date: Thu, 25 Oct 2007 15:48:33 +0100 [thread overview]
Message-ID: <20071025144833.GN10006@agk.fab.redhat.com> (raw)
In-Reply-To: <4720A59A.8060001@ce.jp.nec.com>
On Thu, Oct 25, 2007 at 10:18:02AM -0400, Jun'ichi Nomura wrote:
> There is no guarantee that the I/O flowing through the device again.
> The table might need be replaced again, but to do that, the resume
> should have been completed to let the userspace know it.
Then the first attempt to set the size could be made to fail
(because it could not get the lock immediately) and the
size could be set after the second resume instead.
- Setting the size would lag behind the actual size the dm table was
supporting, but (given the usage cases discussed) this would not matter.
> bdget() in noflush suspend has a possibility of stall.
So we cannot avoid fixing that: we require immediate return
with failure instead of waiting.
> OTOH, calling bdget() and i_size_write() outside of the lock
> can cause race with other table swapping and may result in setting
> wrong device size.
If the size setting is removed from the lock, then it becomes
"set the inode size to match the current size of the table" and
races would not matter - each "set size" attempt would set it
to the instantaneous live table size, not a cached value that
could be out-of-date.
Alasdair
--
agk@redhat.com
next prev parent reply other threads:[~2007-10-25 14:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 21:25 Jun'ichi Nomura
2007-10-25 1:24 ` [dm-devel] " Alasdair G Kergon
2007-10-25 14:18 ` Jun'ichi Nomura
2007-10-25 14:48 ` Alasdair G Kergon [this message]
2007-10-25 18:46 ` Jun'ichi Nomura
2007-10-25 23:51 ` Jun'ichi Nomura
2007-10-26 0:37 ` Alasdair G Kergon
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=20071025144833.GN10006@agk.fab.redhat.com \
--to=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome