> -----Original Message----- > From: Jaegeuk Kim [mailto:[email protected]] > Sent: Wednesday, December 18, 2013 8:12 AM > To: [email protected] > Cc: [email protected]; [email protected] > Subject: Re: [f2fs-dev] [PATCH] f2fs: introduce a new direct_IO write path > > Change log from v1: > o fix NOSPC error handling > > >From b8511a74fe98b67247a9feeed58441e8f5ffd705 Mon Sep 17 00:00:00 2001 > From: Jaegeuk Kim <[email protected]> > Date: Mon, 16 Dec 2013 19:04:05 +0900 > Subject: [PATCH] f2fs: introduce a new direct_IO write path > Cc: [email protected], [email protected], > [email protected] > > Previously, f2fs doesn't support direct IOs with high performance, which > throws > every write requests via the buffered write path, resulting in highly > performance degradation due to memory opeations like copy_from_user. > > This patch introduces a new direct IO path in which every write requests > are > processed by generic blockdev_direct_IO() with enhanced get_block > function. > > The get_data_block() in f2fs handles: > 1. if original data blocks are allocates, then give them to blockdev. > 2. otherwise, > a. preallocate requested block addresses > b. do not use extent cache for better performance > c. give the block addresses to blockdev > > This policy induces that: > - new allocated data are sequentially written to the disk > - updated data are randomly written to the disk. > - f2fs gives consistency on its file meta, not file data.
Looks Nice! > > Signed-off-by: Jaegeuk Kim <[email protected]> Reviewed-by: Chao Yu <[email protected]> > + > + end_offset = IS_INODE(dn.node_page) ? > + ADDRS_PER_INODE(F2FS_I(inode)) : ADDRS_PER_BLOCK; > + bh_result->b_size = (((size_t)1) << blkbits); > + dn.ofs_in_node++; > + pgofs++; > + > +get_next: > + if (dn.ofs_in_node >= end_offset) { > + if (allocated) > + sync_inode_page(&dn); > + allocated = false; if (allocated) { sync_inode_page(&dn); allocated = false; } Certainly, it's really not a big deal. :) Thanks ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
