aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-08-16 22:05:14 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-08-16 22:05:14 -0400
commit7869a4a6c5caa7b2e5c41ccaf46eb3371f88eea7 (patch)
tree1c55037a6b090b843b7f8669686dfdbbfd9ceb70 /fs/ext4/ioctl.c
parent107a7bd31ac003e42c0f966aa8e5b26947de6024 (diff)
ext4: add support for extent pre-caching
Add a new fiemap flag which forces the all of the extents in an inode to be cached in the extent_status tree. This is critically important when using AIO to a preallocated file, since if we need to read in blocks from the extent tree, the io_submit(2) system call becomes synchronous, and the AIO is no longer "A", which is bad. In addition, for most files which have an external leaf tree block, the cost of caching the information in the extent status tree will be less than caching the entire 4k block in the buffer cache. So it is generally a win to keep the extent information cached. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index c0427e2f6648..5498f75a1648 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -624,6 +624,8 @@ resizefs_out:
624 624
625 return 0; 625 return 0;
626 } 626 }
627 case EXT4_IOC_PRECACHE_EXTENTS:
628 return ext4_ext_precache(inode);
627 629
628 default: 630 default:
629 return -ENOTTY; 631 return -ENOTTY;
@@ -688,6 +690,7 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
688 case EXT4_IOC_MOVE_EXT: 690 case EXT4_IOC_MOVE_EXT:
689 case FITRIM: 691 case FITRIM:
690 case EXT4_IOC_RESIZE_FS: 692 case EXT4_IOC_RESIZE_FS:
693 case EXT4_IOC_PRECACHE_EXTENTS:
691 break; 694 break;
692 default: 695 default:
693 return -ENOIOCTLCMD; 696 return -ENOIOCTLCMD;