Vivek Goyal
c83f6bf98d
block: add partition resize function to blkpg ioctl
...
Add a new operation code (BLKPG_RESIZE_PARTITION) to the BLKPG ioctl that
allows altering the size of an existing partition, even if it is currently
in use.
This patch converts hd_struct->nr_sects into sequence counter because
One might extend a partition while IO is happening to it and update of
nr_sects can be non-atomic on 32bit machines with 64bit sector_t. This
can lead to issues like reading inconsistent size of a partition. Sequence
counter have been used so that readers don't have to take bdev mutex lock
as we call sector_in_part() very frequently.
Now all the access to hd_struct->nr_sects should happen using sequence
counter read/update helper functions part_nr_sects_read/part_nr_sects_write.
There is one exception though, set_capacity()/get_capacity(). I think
theoritically race should exist there too but this patch does not
modify set_capacity()/get_capacity() due to sheer number of call sites
and I am afraid that change might break something. I have left that as a
TODO item. We can handle it later if need be. This patch does not introduce
any new races as such w.r.t set_capacity()/get_capacity().
v2: Add CONFIG_LBDAF test to UP preempt case as suggested by Phillip.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-08-01 12:24:18 +02:00
..
2012-05-25 09:31:59 -07:00
2012-05-24 11:54:29 -07:00
2012-05-30 11:17:19 -07:00
2012-05-07 15:39:35 -07:00
2012-05-20 10:06:08 -03:00
2012-04-20 09:22:02 -07:00
2012-05-12 13:32:17 +08:00
2012-04-23 14:23:32 +03:00
2012-05-24 10:34:29 -07:00
2012-05-14 13:34:31 -07:00
2012-05-10 22:39:43 -07:00
2012-04-11 17:55:06 -04:00
2012-05-29 11:53:11 -07:00
2012-05-31 18:18:16 -04:00
2012-05-26 12:57:47 -07:00
2012-06-01 16:55:42 -07:00
2012-05-16 22:17:37 -04:00
2012-05-08 20:25:42 +02:00
2012-05-09 12:53:47 +02:00
2012-05-15 17:30:30 -04:00
2012-05-31 18:18:11 -07:00
2012-05-12 19:57:34 -07:00
2012-05-23 14:15:09 -07:00
2012-05-05 20:28:11 -07:00
2012-05-22 13:54:18 +10:00
2012-05-14 18:03:04 +01:00
2012-05-29 16:22:33 -07:00
2012-05-26 12:42:29 -07:00
2012-05-16 12:45:22 -04:00
2012-05-31 20:29:58 -04:00
2012-05-22 15:50:46 -07:00
2012-03-30 16:45:39 -07:00
2012-04-20 14:56:36 -07:00
2012-05-29 16:22:29 -07:00
2012-03-24 10:41:37 -07:00
2012-05-15 20:14:35 -04:00
2012-04-14 11:13:20 +10:00
2012-05-19 12:17:35 -06:00
2012-04-01 12:55:00 -07:00
2012-03-23 16:58:34 -07:00
2012-06-26 18:42:49 -04:00
2012-08-01 12:24:18 +02:00
2012-05-29 16:22:22 -07:00
2012-06-25 11:53:48 +02:00
2012-05-29 16:22:20 -07:00
2012-05-23 17:42:39 -07:00
2012-03-24 10:41:37 -07:00
2012-04-11 09:16:48 -07:00
2012-05-08 14:13:25 -07:00
2012-05-15 12:02:39 -07:00
2012-05-11 17:13:00 +02:00
2012-05-02 09:30:32 +01:00
2012-03-28 18:30:03 +01:00
2012-06-03 20:05:57 -07:00
2012-05-31 17:49:32 -07:00
2012-03-23 16:58:36 -07:00
2012-05-31 17:49:29 -07:00
2012-03-24 10:41:37 -07:00
2012-03-30 03:23:30 -04:00
2012-03-29 15:38:31 +10:30
2012-03-29 14:46:05 -07:00
2012-03-23 16:58:38 -07:00
2012-05-31 17:49:28 -07:00
2012-03-24 10:08:39 -07:00
2012-03-29 19:52:48 +08:00
2012-05-07 15:02:26 +02:00
2012-05-10 19:54:35 -07:00
2012-04-05 05:08:04 -04:00
2012-04-14 15:24:26 -04:00
2012-03-28 15:58:21 -07:00
2012-04-17 00:18:36 -04:00
2012-05-25 09:18:59 -07:00
2012-05-02 14:15:27 -05:00
2012-03-28 16:36:44 +02:00
2012-05-25 12:46:23 +05:30
2012-05-21 15:09:37 +02:00
2012-04-04 17:13:43 -07:00
2012-05-31 17:49:31 -07:00
2012-05-07 14:35:00 +02:00
2012-05-09 15:10:45 +02:00
2012-05-09 15:10:45 +02:00
2012-05-10 12:00:56 +02:00
2012-05-01 08:58:06 -04:00
2012-05-28 19:13:50 -03:00
2012-04-30 15:30:18 -07:00
2012-06-01 12:12:01 -04:00
2012-05-17 15:36:35 -04:00
2012-05-15 13:13:33 -04:00
2012-05-31 17:49:32 -07:00
2012-05-05 21:50:41 +02:00
2012-05-29 23:28:33 -04:00
2012-03-31 16:03:16 -04:00
2012-05-04 16:25:29 -07:00
2012-06-01 16:57:51 -07:00
2012-05-21 20:27:36 -07:00
2012-05-24 12:57:47 -07:00
2012-05-14 09:47:23 -03:00
2012-06-03 14:50:19 -07:00
2012-04-18 13:46:42 -07:00
2012-05-30 21:04:53 -04:00
2012-05-10 15:55:43 -04:00
2012-05-16 20:00:27 -04:00
2012-04-12 12:57:08 +02:00
2012-04-04 09:25:44 -07:00
2012-04-09 11:14:50 -07:00
2012-05-29 22:33:56 -04:00
2012-08-01 12:24:18 +02:00
2012-05-21 15:09:33 +02:00
2012-04-27 10:46:45 +08:00
2012-05-18 16:48:35 -06:00
2012-05-22 11:32:31 +02:00
2012-04-30 10:39:17 +02:00
2012-03-24 10:08:39 -07:00
2012-05-29 16:22:21 -07:00
2012-05-25 12:48:26 -04:00
2012-05-22 16:02:13 -07:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2012-05-12 14:28:18 +02:00
2012-05-12 14:28:15 +02:00
2012-05-12 14:28:14 +02:00
2012-03-26 21:47:19 +02:00
2012-05-30 10:55:34 +02:00
2012-05-17 19:06:13 -04:00
2012-03-28 15:58:21 -07:00
2012-04-16 14:19:29 -04:00
2012-05-22 17:13:11 -04:00
2012-03-27 22:45:26 -04:00
2012-04-15 13:06:05 -04:00
2012-04-15 13:06:05 -04:00
2012-04-28 22:21:51 -04:00
2012-05-01 09:30:55 -04:00
2012-04-21 16:26:33 -04:00
2012-03-24 10:08:39 -07:00
2012-05-17 15:49:51 -04:00
2012-05-23 22:11:12 -04:00
2012-05-22 18:08:08 +02:00
2012-05-07 10:58:57 -06:00
2012-05-08 19:38:31 +02:00
2012-05-31 17:49:31 -07:00
2012-05-23 13:49:23 -04:00
2012-05-21 21:09:38 +02:00
2012-05-19 12:41:56 -06:00
2012-04-09 11:16:55 -07:00
2012-05-27 08:12:42 -04:00
2012-04-29 18:21:10 -04:00
2012-05-15 23:34:37 +02:00
2012-05-29 16:22:32 -07:00
2012-05-31 17:49:30 -07:00
2012-05-31 17:49:32 -07:00
2012-04-12 18:35:58 -07:00
2012-05-29 16:22:21 -07:00
2012-05-31 17:49:26 -07:00
2012-05-31 17:49:30 -07:00
2012-05-23 22:11:31 -04:00
2012-05-11 10:56:56 +01:00
2012-03-29 17:41:25 -05:00
2012-04-19 19:17:30 -07:00
2012-05-31 17:49:28 -07:00
2012-05-16 16:08:28 -03:00
2012-05-17 21:06:01 -03:00
2012-05-01 09:30:55 -04:00
2012-05-29 16:22:29 -07:00
2012-05-29 16:22:32 -07:00
2012-03-23 16:58:34 -07:00
2012-05-29 16:22:31 -07:00
2012-05-29 23:28:41 -04:00
2012-05-07 15:32:23 -04:00
2012-03-28 18:30:03 +01:00
2012-05-15 08:08:31 -07:00
2012-03-23 16:58:33 -07:00
2012-03-26 20:40:59 +04:00
2012-04-09 12:23:04 -04:00
2012-03-23 16:58:31 -07:00
2012-05-07 22:58:09 -04:00
2012-05-09 13:58:06 -07:00
2012-05-29 16:22:28 -07:00
2012-05-29 16:22:20 -07:00
2012-06-25 11:53:47 +02:00
2012-05-22 15:20:28 -04:00
2012-05-16 15:24:36 -04:00
2012-05-16 15:23:46 -04:00
2012-05-29 16:22:28 -07:00
2012-05-29 16:22:19 -07:00
2012-06-01 10:34:35 -07:00
2012-05-29 16:22:20 -07:00
2012-05-29 16:22:26 -07:00
2012-05-01 12:54:54 +02:00
2012-03-26 12:50:52 +10:30
2012-04-30 14:05:27 -04:00
2012-05-31 17:49:27 -07:00
2012-03-27 08:26:34 +01:00
2012-05-08 16:33:56 -07:00
2012-04-15 13:06:04 -04:00
2012-05-29 22:33:55 -04:00
2012-05-30 16:34:27 -04:00
2012-04-24 00:16:24 -04:00
2012-04-20 21:22:30 -04:00
2012-05-08 20:25:42 +02:00
2012-04-12 15:10:33 -04:00
2012-05-26 14:17:30 -04:00
2012-05-22 16:45:48 -04:00
2012-05-24 16:15:48 -04:00
2012-05-09 15:17:43 -04:00
2012-05-26 14:17:31 -04:00
2012-05-16 13:08:15 -04:00
2012-05-16 15:17:08 -04:00
2012-03-23 16:58:31 -07:00
2012-03-24 10:41:37 -07:00
2012-05-18 16:48:36 -06:00
2012-05-12 14:28:17 +02:00
2012-04-17 16:37:22 -06:00
2012-05-07 22:58:09 -04:00
2012-05-21 14:31:48 +01:00
2012-04-18 15:07:53 -07:00
2012-05-02 01:14:40 +02:00
2012-05-29 16:22:24 -07:00
2012-03-24 10:08:39 -07:00
2012-05-21 15:09:33 +02:00
2012-05-29 16:22:18 -07:00
2012-03-28 18:30:03 +01:00
2012-05-09 15:57:01 +02:00
2012-05-29 18:27:19 -07:00
2012-05-14 14:15:32 -07:00
2012-05-23 17:40:51 +02:00
2012-05-16 00:59:12 -04:00
2012-05-15 14:59:28 -07:00
2012-04-29 13:12:42 -07:00
2012-05-12 15:53:42 -04:00
2012-05-18 20:45:26 +02:00
2012-03-28 23:31:24 +02:00
2012-05-01 21:28:38 +02:00
2012-05-01 21:25:49 +02:00
2012-05-01 21:28:38 +02:00
2012-03-23 16:58:38 -07:00
2012-05-04 21:15:52 -07:00
2012-05-31 17:49:32 -07:00
2012-05-07 17:03:27 -07:00
2012-05-15 14:59:28 -07:00
2012-05-17 08:51:59 -07:00
2012-04-04 05:28:45 -04:00
2012-04-14 11:13:21 +10:00
2012-05-03 03:29:34 -07:00
2012-03-28 17:14:37 -07:00
2012-05-17 15:18:37 +02:00
2012-04-24 20:54:49 -07:00
2012-05-11 10:14:21 -07:00
2012-05-02 14:48:27 -07:00
2012-05-11 10:14:21 -07:00
2012-05-14 17:40:05 +01:00
2012-03-24 10:08:39 -07:00
2012-05-29 16:22:27 -07:00
2012-04-23 21:17:51 -04:00
2012-05-31 17:49:31 -07:00
2012-05-31 17:49:31 -07:00
2012-05-29 16:22:21 -07:00
2012-05-12 15:15:20 -04:00
2012-05-29 16:22:33 -07:00
2012-04-15 13:06:04 -04:00
2012-03-28 18:30:03 +01:00
2012-06-01 12:58:51 -04:00
2012-04-18 12:24:50 +10:00
2012-06-01 10:37:01 -04:00
2012-03-24 10:08:39 -07:00
2012-05-04 15:13:54 -07:00
2012-05-23 17:12:06 -07:00
2012-04-18 15:57:31 -07:00
2012-04-09 17:39:34 +09:00
2012-05-17 19:02:14 -04:00
2012-04-04 09:25:42 -07:00
2012-04-11 12:05:50 +09:00
2012-05-22 19:07:55 +09:00
2012-05-15 14:59:29 -07:00
2012-06-01 12:58:52 -04:00
2012-05-29 17:30:08 -04:00
2012-05-31 17:49:26 -07:00
2012-03-28 15:04:26 -07:00
2012-05-08 12:35:06 +02:00
2012-04-25 20:46:59 -04:00
2012-04-15 12:44:40 -04:00
2012-03-23 13:18:57 +01:00
2012-03-28 15:58:21 -07:00
2012-06-13 21:16:42 +02:00
2012-04-30 10:48:25 -07:00
2012-05-15 14:08:35 -07:00
2012-04-14 07:47:49 -07:00
2012-05-14 18:53:19 -04:00
2012-04-20 23:27:08 +02:00
2012-03-28 18:30:03 +01:00
2012-05-01 21:25:49 +02:00
2012-05-29 16:22:28 -07:00
2012-05-31 17:49:32 -07:00
2012-05-14 12:19:56 -07:00
2012-05-23 22:09:21 -04:00
2012-05-22 19:22:50 -07:00
2012-06-01 12:58:50 -04:00
2012-05-09 14:19:13 -07:00
2012-05-21 16:16:58 -07:00
2012-03-22 19:43:43 -07:00
2012-05-22 18:27:32 -07:00
2012-05-23 22:11:31 -04:00
2012-05-10 11:24:03 -07:00
2012-06-02 15:21:43 -07:00
2012-05-30 21:04:50 -04:00
2012-04-26 02:01:39 -07:00
2012-04-14 13:25:48 +02:00
2012-05-21 09:00:03 -07:00
2012-05-03 03:28:39 -07:00
2012-05-09 13:57:30 -07:00
2012-05-20 08:27:44 -03:00
2012-04-10 15:00:41 -03:00
2012-05-13 11:27:21 +02:00
2012-05-03 09:30:55 +01:00
2012-05-20 08:31:52 -03:00
2012-05-22 12:16:16 +09:30
2012-03-27 16:30:09 -07:00
2012-04-15 03:23:31 -04:00
2012-03-31 08:09:50 +05:30
2012-04-25 21:26:33 -07:00
2012-04-26 12:34:58 -07:00
2012-04-24 16:14:14 -07:00
2012-03-28 18:30:03 +01:00
2012-05-30 07:55:31 +02:00
2012-05-06 13:43:41 +08:00