From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: device-mapper development <dm-devel@redhat.com>,
Mikulas Patocka <mpatocka@redhat.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Subject: Re: [PATCH 2/2] dm-bdev-keep-bdev-always-referenced.patch
Date: Tue, 12 May 2009 17:32:23 +0900 [thread overview]
Message-ID: <4A093417.6050007@ce.jp.nec.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0904290223490.9079@hs20-bc2-1.build.redhat.com>
Mikulas Patocka wrote:
> @@ -1280,8 +1284,7 @@ static int __bind(struct mapped_device *
> if (size != get_capacity(md->disk))
> memset(&md->geometry, 0, sizeof(md->geometry));
>
> - if (md->bdev)
> - __set_size(md, size);
> + __set_size(md, size);
>
> if (!size) {
> dm_table_destroy(t);
> @@ -1523,11 +1526,6 @@ int dm_swap_table(struct mapped_device *
> if (!dm_suspended(md))
> goto out;
>
> - /* without bdev, the device size cannot be changed */
> - if (!md->bdev)
> - if (get_capacity(md->disk) != dm_table_get_size(table))
> - goto out;
> -
> __unbind(md);
> r = __bind(md, table);
When the device is suspended with noflush,
can __set_size() wait forever on i_mutex
if somebody is waiting for I/O flushing with i_mutex held (e.g. fsync)?
md->bdev was also used as a marker to tell whether the device was
suspended with noflush.
Sorry, the original comment in the code was perhaps not adequate.
Thanks,
--
Jun'ichi Nomura, NEC Corporation
next prev parent reply other threads:[~2009-05-12 8:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 16:14 [PATCH 1/2] dm-bdev-rename-suspended_bdev-to-bdev.patch Mikulas Patocka
2009-04-28 16:14 ` [PATCH 2/2] dm-bdev-keep-bdev-always-referenced.patch Mikulas Patocka
2009-04-29 6:26 ` Mikulas Patocka
2009-05-12 8:32 ` Jun'ichi Nomura [this message]
2009-05-18 15:34 ` Mikulas Patocka
2009-05-19 1:36 ` Jun'ichi Nomura
2009-05-18 15:35 ` [PATCH] use i_size_read() instead of i_size Mikulas Patocka
2009-07-23 8:52 ` [PATCH 2/2] dm-bdev-keep-bdev-always-referenced.patch Jun'ichi Nomura
2009-07-27 23:44 ` [PATCH] drop mutex in __set_size Mikulas Patocka
2009-07-29 0:14 ` Jun'ichi Nomura
2009-07-30 15:17 ` Mikulas Patocka
2009-07-30 23:49 ` 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=4A093417.6050007@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mpatocka@redhat.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 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.