summaryrefslogtreecommitdiffstats
path: root/include/linux/f2fs_fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim2016-02-03 22:49:44 +0100
committerJaegeuk Kim2016-02-23 01:07:23 +0100
commit24b8491251cde66879e74092167cc0f27a1f11ce (patch)
treeffb8fc277cc2a649e6d98c6305083683e2dfee1b /include/linux/f2fs_fs.h
parentf2fs: move dio preallocation into f2fs_file_write_iter (diff)
downloadkernel-qcow2-linux-24b8491251cde66879e74092167cc0f27a1f11ce.tar.gz
kernel-qcow2-linux-24b8491251cde66879e74092167cc0f27a1f11ce.tar.xz
kernel-qcow2-linux-24b8491251cde66879e74092167cc0f27a1f11ce.zip
f2fs: preallocate blocks for buffered aio writes
This patch preallocates data blocks for buffered aio writes. With this patch, we can avoid redundant locking and unlocking of node pages given consecutive aio request. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux/f2fs_fs.h')
-rw-r--r--include/linux/f2fs_fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index ac8040278f69..f43e6a01a023 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -21,7 +21,7 @@
#define F2FS_BLKSIZE 4096 /* support only 4KB block */
#define F2FS_BLKSIZE_BITS 12 /* bits for F2FS_BLKSIZE */
#define F2FS_MAX_EXTENSION 64 /* # of extension entries */
-#define F2FS_BLK_ALIGN(x) (((x) + F2FS_BLKSIZE - 1) / F2FS_BLKSIZE)
+#define F2FS_BLK_ALIGN(x) (((x) + F2FS_BLKSIZE - 1) >> F2FS_BLKSIZE_BITS)
#define NULL_ADDR ((block_t)0) /* used as block_t addresses */
#define NEW_ADDR ((block_t)-1) /* used as block_t addresses */