James Bottomley
871dd9286e
block: fix max discard sectors limit
...
linux-v3.8-rc1 and later support for plug for blkdev_issue_discard with
commit 0cfbcafcae
(block: add plug for blkdev_issue_discard )
For example,
1) DISCARD rq-1 with size size 4GB
2) DISCARD rq-2 with size size 1GB
If these 2 discard requests get merged, final request size will be 5GB.
In this case, request's __data_len field may overflow as it can store
max 4GB(unsigned int).
This issue was observed while doing mkfs.f2fs on 5GB SD card:
https://lkml.org/lkml/2013/4/1/292
Info: sector size = 512
Info: total sectors = 11370496 (in 512bytes)
Info: zone aligned segment0 blkaddr: 512
[ 257.789764] blk_update_request: bio idx 0 >= vcnt 0
mkfs process gets stuck in D state and I see the following in the dmesg:
[ 257.789733] __end_that: dev mmcblk0: type=1, flags=122c8081
[ 257.789764] sector 4194304, nr/cnr 2981888/4294959104
[ 257.789764] bio df3840c0, biotail df3848c0, buffer (null), len
1526726656
[ 257.789764] blk_update_request: bio idx 0 >= vcnt 0
[ 257.794921] request botched: dev mmcblk0: type=1, flags=122c8081
[ 257.794921] sector 4194304, nr/cnr 2981888/4294959104
[ 257.794921] bio df3840c0, biotail df3848c0, buffer (null), len
1526726656
This patch fixes this issue.
Reported-by: Max Filippov <jcmvbkbc@gmail.com >
Signed-off-by: James Bottomley <JBottomley@Parallels.com >
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com >
Tested-by: Max Filippov <jcmvbkbc@gmail.com >
Cc: <stable@vger.kernel.org >
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2013-04-24 08:52:50 -06:00
..
2013-02-26 09:24:48 -08:00
2013-03-02 16:33:54 -08:00
2013-02-26 15:03:06 -08:00
2013-02-21 15:27:22 -08:00
2013-02-13 08:35:43 -08:00
2013-03-01 13:39:00 -08:00
2013-03-08 16:03:29 -08:00
2013-03-02 16:31:21 +00:00
2013-02-20 11:00:43 -08:00
2013-03-03 12:06:09 -08:00
2013-02-28 18:02:55 -08:00
2013-03-28 15:51:33 -07:00
2013-02-26 11:41:08 -08:00
2013-02-24 14:37:22 -05:00
2013-03-14 12:48:54 +00:00
2013-02-26 17:24:26 -05:00
2013-02-13 06:16:08 -08:00
2013-02-15 09:52:29 +01:00
2013-03-02 16:33:54 -08:00
2013-02-16 13:34:10 -08:00
2013-01-02 17:36:10 -08:00
2013-03-01 06:07:22 +00:00
2013-02-22 09:20:11 -08:00
2013-02-21 12:11:44 -08:00
2013-02-08 13:16:17 -05:00
2013-03-02 16:46:07 -08:00
2013-03-25 10:39:17 -07:00
2013-03-02 09:34:39 -08:00
2012-10-08 13:50:19 +10:30
2012-10-09 16:22:46 +09:00
2013-04-01 19:08:06 -07:00
2013-03-01 12:47:16 +01:00
2013-02-26 02:46:13 -05:00
2013-03-23 14:26:34 -07:00
2012-03-23 16:58:34 -07:00
2013-03-24 21:38:59 -06:00
2013-04-24 08:52:50 -06:00
2013-02-15 18:52:45 -08:00
2013-02-23 17:50:12 -08:00
2013-02-20 09:37:28 -05:00
2013-02-21 17:22:16 -08:00
2011-01-13 08:03:17 -08:00
2013-02-13 06:00:53 -08:00
2009-01-23 22:28:48 -08:00
2013-02-23 17:50:10 -08:00
2013-02-25 09:24:55 -05:00
2013-02-21 17:22:15 -08:00
2013-02-21 17:22:15 -08:00
2013-02-21 17:22:15 -08:00
2013-02-21 17:22:16 -08:00
2013-02-15 16:45:06 +01:00
2008-04-30 08:29:54 -07:00
2013-02-25 16:46:44 -08:00
2013-01-26 17:37:17 +01:00
2013-02-11 18:49:51 -05:00
2013-03-12 11:30:04 -07:00
2005-04-16 15:20:36 -07:00
2012-03-23 16:58:38 -07:00
2013-01-09 08:26:53 -08:00
2012-10-13 10:46:48 +01:00
2011-03-22 19:25:05 -07:00
2013-02-26 02:46:09 -05:00
2013-03-31 11:38:33 -07:00
2012-11-26 19:17:44 +09:00
2013-03-01 22:45:49 +00:00
2013-03-12 11:36:35 -07:00
2013-03-01 22:45:49 +00:00
2013-02-27 15:13:36 +05:30
2012-10-24 17:06:43 +02:00
2013-02-27 22:37:34 +05:30
2011-10-14 16:48:08 +02:00
2013-02-28 09:53:21 +05:30
2011-11-29 12:46:19 -05:00
2013-03-03 23:59:59 -08:00
2013-03-16 06:32:30 +01:00
2013-02-21 09:38:18 -08:00
2013-02-28 12:52:24 -08:00
2013-02-26 02:46:08 -05:00
2008-01-28 23:21:18 +01:00
2013-01-21 14:07:44 -05:00
2012-10-13 10:46:48 +01:00
2013-02-27 19:10:23 -08:00
2012-10-13 10:46:48 +01:00
2012-11-28 21:49:02 -05:00
2013-02-23 17:50:12 -08:00
2013-03-31 11:38:33 -07:00
2013-03-27 07:49:29 -07:00
2013-03-03 19:36:31 -08:00
2013-02-22 23:31:31 -05:00
2013-02-26 03:10:52 +11:00
2013-02-22 00:05:07 +01:00
2013-03-18 10:21:23 +01:00
2013-02-27 19:10:24 -08:00
2013-02-22 08:20:05 +01:00
2009-06-26 10:48:34 +02:00
2013-02-21 10:45:01 +01:00
2013-02-23 17:50:16 -08:00
2013-02-23 17:50:17 -08:00
2013-02-26 20:16:07 -08:00
2011-05-25 14:15:12 +02:00
2013-01-25 11:17:31 -08:00
2012-10-13 10:46:48 +01:00
2013-03-13 15:21:47 -07:00
2013-02-15 09:41:42 +01:00
2013-02-27 19:10:24 -08:00
2013-02-23 21:00:06 -05:00
2013-02-11 14:16:26 -05:00
2011-07-21 13:47:54 -07:00
2013-01-29 13:59:57 -05:00
2013-02-19 08:06:01 +01:00
2012-11-10 00:40:24 -08:00
2006-10-05 15:10:12 +01:00
2013-02-27 19:10:21 -08:00
2013-03-22 16:41:19 -07:00
2013-02-09 16:29:20 -05:00
2012-05-31 17:49:32 -07:00
2012-10-13 10:46:48 +01:00
2013-03-22 16:41:20 -07:00
2013-02-23 17:50:19 -08:00
2013-03-22 08:08:06 -03:00
2012-11-26 14:28:51 -08:00
2009-06-16 19:47:57 -07:00
2013-03-14 13:18:30 -07:00
2013-02-19 15:17:08 -05:00
2013-02-22 19:25:09 -08:00
2012-11-30 11:48:05 +01:00
2013-02-20 19:36:01 +01:00
2013-03-02 09:34:39 -08:00
2013-02-23 17:50:20 -08:00
2013-02-23 17:50:13 -08:00
2013-02-23 17:50:19 -08:00
2013-02-23 17:50:17 -08:00
2013-03-28 17:45:51 -07:00
2013-03-28 17:45:51 -07:00
2013-03-22 16:41:20 -07:00
2013-01-21 17:18:20 +10:30
2012-09-28 14:31:03 +09:30
2012-12-14 13:06:40 +10:30
2013-03-27 07:50:04 -07:00
2012-10-13 10:46:48 +01:00
2011-12-05 10:21:44 -08:00
2013-03-19 11:07:58 +08:00
2013-02-15 15:17:11 -05:00
2013-02-19 13:18:13 -05:00
2013-02-11 19:19:33 -05:00
2013-02-13 06:16:06 -08:00
2013-02-13 06:15:29 -08:00
2013-03-02 16:46:07 -08:00
2012-11-20 04:18:14 -08:00
2013-02-13 10:11:53 +00:00
2013-02-13 10:09:31 +00:00
2012-12-11 17:22:27 -08:00
2013-02-23 00:30:08 +01:00
2012-01-10 16:30:42 -08:00
2013-02-23 17:50:17 -08:00
2013-02-14 15:55:23 +01:00
2013-02-23 17:50:15 -08:00
2013-02-21 17:22:19 -08:00
2012-01-12 20:13:10 -08:00
2013-03-01 23:51:07 -05:00
2013-02-28 20:42:33 -08:00
2013-02-25 21:18:18 -08:00
2012-10-06 03:04:44 +09:00
2013-03-17 15:59:15 -07:00
2013-02-27 19:10:24 -08:00
2012-08-01 10:26:23 -07:00
2013-02-23 17:50:16 -08:00
2013-02-23 17:50:16 -08:00
2013-02-21 12:05:51 -08:00
2013-02-13 09:40:35 -08:00
2011-03-31 11:26:23 -03:00
2013-03-22 16:41:20 -07:00
2013-02-21 13:41:04 -08:00
2013-01-20 12:26:05 -08:00
2013-02-26 09:34:29 -08:00
2013-02-08 13:14:40 +00:00
2013-01-23 13:44:00 -05:00
2013-02-27 19:10:24 -08:00
2013-02-14 17:11:09 +00:00
2013-03-13 15:21:44 -07:00
2012-10-13 10:46:48 +01:00
2013-01-30 11:01:53 -05:00
2013-02-23 17:50:17 -08:00
2006-07-13 13:21:35 -07:00
2012-07-04 11:51:59 +03:00
2007-05-02 11:56:33 +01:00
2013-02-21 12:05:51 -08:00
2013-02-27 19:10:10 -08:00
2013-03-19 13:45:20 -07:00
2012-08-14 21:47:55 -07:00
2013-02-19 08:43:34 +01:00
2013-02-13 10:13:58 -08:00
2012-08-24 15:55:33 -07:00
2013-03-14 11:53:32 -04:00
2013-02-21 17:22:20 -08:00
2013-02-26 22:25:17 +01:00
2013-02-10 19:41:08 -05:00
2006-12-07 02:14:08 +01:00
2013-03-01 12:40:36 +01:00
2012-03-28 18:30:03 +01:00
2008-10-03 11:46:14 -05:00
2013-02-13 12:15:50 -08:00
2013-02-09 22:30:44 +01:00
2013-02-23 17:50:22 -08:00
2013-02-14 09:21:15 -05:00
2010-02-04 14:20:41 +11:00
2008-10-16 11:21:32 -07:00
2013-02-13 13:22:15 -05:00
2013-03-20 17:56:58 -04:00
2012-12-18 15:02:13 -08:00
2013-02-21 14:58:40 -08:00
2012-11-13 15:48:27 -05:00
2013-02-13 10:13:58 -08:00
2013-03-20 12:10:38 -04:00
2012-10-13 10:46:48 +01:00
2013-02-08 18:28:04 +01:00
2013-03-27 07:50:08 -07:00
2013-02-14 00:22:58 +01:00
2013-02-13 17:00:32 +10:30
2013-02-23 17:50:15 -08:00
2012-04-26 12:34:58 -07:00
2013-02-23 17:50:16 -08:00
2012-11-30 11:47:57 +01:00
2013-03-01 12:48:36 +01:00
2013-02-08 10:05:02 +02:00
2013-04-01 11:23:38 -07:00
2011-03-22 17:44:17 -07:00