]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commit
mmc:fix max discard sectors limit
authorNamjae Jeon <namjae.jeon@samsung.com>
Tue, 16 Apr 2013 11:12:29 +0000 (16:42 +0530)
committerBalaji T K <balajitk@ti.com>
Tue, 16 Apr 2013 11:12:29 +0000 (16:42 +0530)
commitca30aa4e6c3d12e171f1eaa2a89c93cede9536b8
tree437c27d1e1e6261842f3733d9f359ad45e598751
parent1ccfc404ff4d00c1ac82674d29589d626dedfbd1
mmc:fix max discard sectors limit

If multiple discard requests get merged, merged discard request's
size exceeds 4GB, there is possibility that merged discard request's
__data_len field may overflow.

Add BLK_DEF_MAX_DISCARD_SECTORS macro to limit max discard sectors
to be under 4G / 512 sectors.

This fixes mkfs.ext4 failure with mmc/sd partition size more than 4GBytes.

Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Vivek Trivedi <t.vivek@samsung.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
block/blk-settings.c
drivers/mmc/card/queue.c
include/linux/blkdev.h