32e5a2a2be
When using a large volume, for example 9T volume with 2T already used, frequent creation of small files with O_DIRECT when the IO is not cluster aligned may clear sectors in the wrong place. This will cause filesystem corruption. This is because p_cpos is a u32. When calculating the corresponding sector it should be converted to u64 first, otherwise it may overflow. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org> [4.0+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
cluster | ||
dlm | ||
dlmfs | ||
acl.c | ||
acl.h | ||
alloc.c | ||
alloc.h | ||
aops.c | ||
aops.h | ||
blockcheck.c | ||
blockcheck.h | ||
buffer_head_io.c | ||
buffer_head_io.h | ||
dcache.c | ||
dcache.h | ||
dir.c | ||
dir.h | ||
dlmglue.c | ||
dlmglue.h | ||
export.c | ||
export.h | ||
extent_map.c | ||
extent_map.h | ||
file.c | ||
file.h | ||
heartbeat.c | ||
heartbeat.h | ||
inode.c | ||
inode.h | ||
ioctl.c | ||
ioctl.h | ||
journal.c | ||
journal.h | ||
Kconfig | ||
localalloc.c | ||
localalloc.h | ||
locks.c | ||
locks.h | ||
Makefile | ||
mmap.c | ||
mmap.h | ||
move_extents.c | ||
move_extents.h | ||
namei.c | ||
namei.h | ||
ocfs1_fs_compat.h | ||
ocfs2_fs.h | ||
ocfs2_ioctl.h | ||
ocfs2_lockid.h | ||
ocfs2_lockingver.h | ||
ocfs2_trace.h | ||
ocfs2.h | ||
quota_global.c | ||
quota_local.c | ||
quota.h | ||
refcounttree.c | ||
refcounttree.h | ||
reservations.c | ||
reservations.h | ||
resize.c | ||
resize.h | ||
slot_map.c | ||
slot_map.h | ||
stack_o2cb.c | ||
stack_user.c | ||
stackglue.c | ||
stackglue.h | ||
suballoc.c | ||
suballoc.h | ||
super.c | ||
super.h | ||
symlink.c | ||
symlink.h | ||
sysfile.c | ||
sysfile.h | ||
uptodate.c | ||
uptodate.h | ||
xattr.c | ||
xattr.h |