1. 20 Nov, 2014 3 commits
    • Chao Yu's avatar
      f2fs: introduce struct inode_management to wrap inner fields · 67298804
      Chao Yu authored
      Now in f2fs, we have three inode cache: ORPHAN_INO, APPEND_INO, UPDATE_INO,
      and we manage fields related to inode cache separately in struct f2fs_sb_info
      for each inode cache type.
      This makes codes a bit messy, so that this patch intorduce a new struct
      inode_management to wrap inner fields as following which make codes more neat.
      
      /* for inner inode cache management */
      struct inode_management {
      	struct radix_tree_root ino_root;	/* ino entry array */
      	spinlock_t ino_lock;			/* for ino entry lock */
      	struct list_head ino_list;		/* inode list head */
      	unsigned long ino_num;			/* number of entries */
      };
      
      struct f2fs_sb_info {
      	...
      	struct inode_management im[MAX_INO_ENTRY];      /* manage inode cache */
      	...
      }
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      67298804
    • Chao Yu's avatar
      f2fs: remove unneeded check code with option in f2fs_remount · aba291b3
      Chao Yu authored
      Because we have checked the contrary condition in case of "if" judgment, we do
      not need to check the condition again in case of "else" judgment. Let's remove
      it.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      aba291b3
    • Chao Yu's avatar
      f2fs: avoid unable to restart gc thread in remount · 6c029932
      Chao Yu authored
      In f2fs_remount, we will stop gc thread and set need_restart_gc as true when new
      option is set without BG_GC, then if any error occurred in the following
      procedure, we can restore to start the gc thread.
      But after that, We will fail to restore gc thread in start_gc_thread as BG_GC is
      not set in new option, so we'd better move this condition judgment out of
      start_gc_thread to fix this issue.
      Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      6c029932
  2. 19 Nov, 2014 2 commits
  3. 11 Nov, 2014 3 commits
    • Jaegeuk Kim's avatar
      f2fs: convert inline_data when i_size becomes large · 92dffd01
      Jaegeuk Kim authored
      If i_size becomes large outside of MAX_INLINE_DATA, we shoud convert the inode.
      Otherwise, we can make some dirty pages during the truncation, and those pages
      will be written through f2fs_write_data_page.
      At that moment, the inode has still inline_data, so that it tries to write non-
      zero pages into inline_data area.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      92dffd01
    • Jaegeuk Kim's avatar
      f2fs: fix deadlock to grab 0'th data page · 764d2c80
      Jaegeuk Kim authored
      The scenario is like this.
      
      One trhead triggers:
        f2fs_write_data_pages
          lock_page
          f2fs_write_data_page
            f2fs_lock_op  <- wait
      
      The other thread triggers:
        f2fs_truncate
          truncate_blocks
            f2fs_lock_op
              truncate_partial_data_page
                lock_page  <- wait for locking the page
      
      This patch resolves this bug by relocating truncate_partial_data_page.
      This function is just to truncate user data page and not related to FS
      consistency as well.
      And, we don't need to call truncate_inline_data. Rather than that,
      f2fs_write_data_page will finally update inline_data later.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      764d2c80
    • Jaegeuk Kim's avatar
      f2fs: reduce the number of inline_data inode before clearing it · 57e2a2c0
      Jaegeuk Kim authored
      The # of inline_data inode is decreased only when it has inline_data.
      After clearing the flag, we can't decreased the number.
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      57e2a2c0
  4. 10 Nov, 2014 3 commits
  5. 06 Nov, 2014 3 commits
  6. 05 Nov, 2014 5 commits
  7. 04 Nov, 2014 21 commits