[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] [PATCH 1/4] Add a lock that will be needed by the next patch
- From: Mikulas Patocka <mpatocka redhat com>
- To: Eric Dumazet <eric dumazet gmail com>
- Cc: Jens Axboe <axboe kernel dk>, Andrea Arcangeli <aarcange redhat com>, Jan Kara <jack suse cz>, linux-kernel vger kernel org, Jeff Moyer <jmoyer redhat com>, dm-devel redhat com, Alexander Viro <viro zeniv linux org uk>, kosaki motohiro jp fujitsu com, linux-fsdevel vger kernel org, lwoodman redhat com, "Alasdair G. Kergon" <agk redhat com>
- Subject: [dm-devel] [PATCH 1/4] Add a lock that will be needed by the next patch
- Date: Fri, 31 Aug 2012 14:41:15 -0400 (EDT)
Add a lock that will be needed by the next patch.
I am submitting this as a separate patch, because the act of adding an
extra field to "struct block_device" affects performance significantly.
So that performance change from adding the lock field can be
differentiated from the performance change of locking.
Signed-off-by: Mikulas Patocka <mpatocka redhat com>
---
drivers/char/raw.c | 2 -
fs/block_dev.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++--
include/linux/fs.h | 4 +++
3 files changed, 63 insertions(+), 3 deletions(-)
Index: linux-3.5-rc6-devel/include/linux/fs.h
===================================================================
--- linux-3.5-rc6-devel.orig/include/linux/fs.h 2012-07-16 20:20:12.000000000 +0200
+++ linux-3.5-rc6-devel/include/linux/fs.h 2012-07-16 01:29:21.000000000 +0200
@@ -713,6 +713,8 @@ struct block_device {
int bd_fsfreeze_count;
/* Mutex for freeze */
struct mutex bd_fsfreeze_mutex;
+ /* A semaphore that prevents I/O while block size is being changed */
+ struct rw_semaphore bd_block_size_semaphore;
};
/*
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]