From: Phillip Susi <psusi@cfl.rr.com>
To: Maxim Patlasov <maxim.patlasov@gmail.com>
Cc: vgoyal@redhat.com, joe@perches.com, kzak@redhat.com,
linux-kernel@vger.kernel.org, jaxboe@fusionio.com
Subject: Re: [PATCH 1/2] Add partition resize function to BLKPG ioctl
Date: Sun, 01 Jan 2012 16:49:05 -0500 [thread overview]
Message-ID: <4F00D4D1.7020506@cfl.rr.com> (raw)
In-Reply-To: <4EFD012D.7040602@cfl.rr.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/29/2011 07:09 PM, Phillip Susi wrote:
> Good points. I also noticed that the read/write functions were only
> being called when not holding the mutex. If anyone is touching
> nr_sects without the mutex, then everyone must use the read/write
> functions, whether they hold the mutex or not. Otherwise, a mutex
> holder that touches it directly will race with a non mutex holder
> using the seqcounter. Vivek, rather than fix the rest of the
> references to nr_sects to use the read/write functions, why not just
> fix the few sites that were accessing it without the mutex to take
> the mutex fist instead of using a seqcounter?
I've been wondering why device-mapper and loop have been able to change device size for years, yet didn't add a seqcounter to do this. It looks to me like there are plenty of places ( like xen-blkback ) that either call get_capacity() or directly reference nr_sects without holding the bd_mutex. Does this mean that device-mapper or loop changing capacity on i386 with large block support already has a race condition?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPANTRAAoJEJrBOlT6nu75FjAIAMR6B/Q4o8VDdZGIMw7RoutP
MHdCFPwcxTjc06061E2oRk4NYHGQFhg9NfKK6vmI2enjB+ctVIFyK2qC+Ar13mUp
KkKbqrVbjOM8AOXgEb4VTQMQ6inTUFEvTOx+EGvAw0flJzpfq7zdjw+1P+BM/PrY
LPhxjb8dPeooHmv2TEFFpW0XavkqBM1JHuL9sM2f2g3U9QKU3clNFnrHGY7p1Wxn
FBO2ncqqSdbJKsw2xskdRfMq1x6jXfUeIyXCoNoTrHHPz+80AeHOMWy2Y54dvZMX
J9iKuQlURG5zyQ1eGh96YlRj4f4Z+zFY8h84K3z2i+xR45J4IgNxXD4ewbIPqg8=
=XZQc
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2012-01-01 21:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 17:06 [PATCH 1/2] Add partition resize function to BLKPG ioctl Maxim Patlasov
2011-12-30 0:09 ` Phillip Susi
2012-01-01 21:49 ` Phillip Susi [this message]
2012-01-26 19:01 ` Vivek Goyal
2012-01-26 20:35 ` Phillip Susi
2012-01-26 21:04 ` Vivek Goyal
2012-01-26 21:48 ` Phillip Susi
2012-01-30 15:49 ` Vivek Goyal
[not found] <cover.1322709471.git.psusi@cfl.rr.com>
2011-12-01 3:23 ` Phillip Susi
2011-12-08 12:30 ` Karel Zak
2011-12-08 14:22 ` Phillip Susi
2011-12-08 15:16 ` Karel Zak
2011-12-08 15:25 ` Phillip Susi
2011-12-08 15:58 ` Vivek Goyal
2011-12-08 16:06 ` Phillip Susi
2011-12-08 16:28 ` Vivek Goyal
2011-12-08 16:55 ` Phillip Susi
2011-12-09 2:53 ` Phillip Susi
2011-12-12 14:53 ` Vivek Goyal
2011-12-12 17:43 ` Phillip Susi
2011-12-12 17:49 ` Joe Perches
2011-12-12 18:04 ` Vivek Goyal
2011-12-13 0:15 ` Phillip Susi
2011-12-13 0:16 ` Phillip Susi
2011-12-19 20:25 ` Vivek Goyal
2011-12-21 1:53 ` Phillip Susi
2011-12-21 1:54 ` Phillip Susi
2011-12-21 20:46 ` Vivek Goyal
2011-12-24 21:36 ` Phillip Susi
2011-12-24 22:21 ` Phillip Susi
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=4F00D4D1.7020506@cfl.rr.com \
--to=psusi@cfl.rr.com \
--cc=jaxboe@fusionio.com \
--cc=joe@perches.com \
--cc=kzak@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxim.patlasov@gmail.com \
--cc=vgoyal@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.