1. 11 Jan, 2013 1 commit
    • Jaegeuk Kim's avatar
      f2fs: add f2fs_balance_fs in several interfaces · 7d82db83
      Jaegeuk Kim authored
      
      
      The f2fs_balance_fs() is to check the number of free sections and decide whether
      it needs to conduct cleaning or not. If there are not enough free sections, the
      cleaning job should be started.
      
      In order to control an amount of free sections even under high utilization, f2fs
      should call f2fs_balance_fs at all the VFS interfaces that are able to produce
      dirty pages.
      This patch adds the function calls in the missing interfaces as follows.
      
      1. f2fs_setxattr()
      The f2fs_setxattr() produces dirty node pages so that we should call
      f2fs_balance_fs() either likewise doing in other VFS interfaces such as
      f2fs_lookup(), f2fs_mkdir(), and so on.
      
      2. f2fs_sync_file()
      We should guarantee serving free sections for syncing metadata during fsync.
      Previously, there is no space check before triggering checkpoint and
      sync_node_pages.
      Therefore, if a bunch of fsync calls are triggered under 100% of FS utilization,
      f2fs is able to be faced with no free sections, resulting in BUG_ON().
      
      3. f2fs_sync_fs()
      Before calling write_checkpoint(), we should guarantee that there are minimum
      free sections.
      
      4. f2fs_write_inode()
      f2fs_write_inode() is also able to produce dirty node pages.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      7d82db83
  2. 28 Dec, 2012 1 commit
  3. 11 Dec, 2012 3 commits
    • Jaegeuk Kim's avatar
      f2fs: resolve build failures · 573ea5fc
      Jaegeuk Kim authored
      
      
      There exist two build failures reported by Randy Dunlap as follows.
      
      (on i386)
       a. (config-r8857)
      	ERROR: "f2fs_xattr_advise_handler" [fs/f2fs/f2fs.ko] undefined!
      
      Key configs in (config-r8857) are as follows.
       CONFIG_F2FS_FS=m
       # CONFIG_F2FS_STAT_FS is not set
       CONFIG_F2FS_FS_XATTR=y
       # CONFIG_F2FS_FS_POSIX_ACL is not set
      
      The error was occurred due to the function location that we made a mistake.
      Recently we added a new functionality for users to indicate cold files
      explicitly through xattr operations (i.e., f2fs_xattr_advise_handler).
      
      This handler should have been added in xattr.c instead of acl.c in order
      to avoid an undefined operation like in this case where XATTR is set and
      ACL is not set.
      
       b. (config-r8855)
      	fs/f2fs/file.c: In function 'f2fs_vm_page_mkwrite':
      	fs/f2fs/file.c:97:2: error: implicit declaration of function
      	'block_page_mkwrite_return'
      
      Key config in (config-r8855) is CONFIG_BLOCK.
      
      Obviously, f2fs works on top of the block device so that we should consider
      carefully a sort of config dependencies.
      
      The reason why this error was occurred was that f2fs_vm_page_mkwrite() calls
      block_page_mkwrite_return() which is enalbed only if CONFIG_BLOCK is set.
      Reported-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      573ea5fc
    • Jaegeuk Kim's avatar
      f2fs: adjust kernel coding style · 0a8165d7
      Jaegeuk Kim authored
      
      
      As pointed out by Randy Dunlap, this patch removes all usage of "/**" for comment
      blocks. Instead, just use "/*".
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      0a8165d7
    • Jaegeuk Kim's avatar
      f2fs: add xattr and acl functionalities · af48b85b
      Jaegeuk Kim authored
      
      
      This implements xattr and acl functionalities.
      
      - F2FS uses a node page to contain use extended attributes.
      Signed-off-by: default avatarChangman Lee <cm224.lee@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      af48b85b