[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1208311433480.2212@file.rdu.redhat.com>
Date: Fri, 31 Aug 2012 14:40:26 -0400 (EDT)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: Jens Axboe <axboe@...nel.dk>,
Andrea Arcangeli <aarcange@...hat.com>,
Jan Kara <jack@...e.cz>, dm-devel@...hat.com,
linux-kernel@...r.kernel.org, Jeff Moyer <jmoyer@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
kosaki.motohiro@...fujitsu.com, linux-fsdevel@...r.kernel.org,
lwoodman@...hat.com, "Alasdair G. Kergon" <agk@...hat.com>
Subject: [PATCH 0/4] Fix a crash when block device is read and block size is
changed at the same time
Hi
This is a series of patches to prevent a crash when when someone is
reading block device and block size is changed simultaneously. (the crash
is already happening in the production environment)
The first patch adds a rw-lock to struct block_device, but doesn't use the
lock anywhere. The reason why I submit this as a separate patch is that on
my computer adding an unused field to this structure affects performance
much more than any locking changes.
The second patch uses the rw-lock. The lock is locked for read when doing
I/O on the block device and it is locked for write when changing block
size.
The third patch converts the rw-lock to a percpu rw-lock for better
performance, to avoid cache line bouncing.
The fourth patch is an alternate percpu rw-lock implementation using RCU
by Eric Dumazet. It avoids any atomic instruction in the hot path.
Mikulas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists