1. 10 8月, 2017 1 次提交
  2. 04 8月, 2017 3 次提交
  3. 01 8月, 2017 5 次提交
    • C
      f2fs: introduce f2fs_statfs_project · ddc34e32
      Chao Yu 提交于
      This patch introduces f2fs_statfs_project, it enables to show usage
      status of directory tree which is limited with project quota.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      ddc34e32
    • J
      f2fs: avoid naming confusion of sysfs init · dc6b2055
      Jaegeuk Kim 提交于
      This patch changes the function names of sysfs init to follow ext4.
      
      f2fs_init_sysfs <-> f2fs_register_sysfs
      f2fs_exit_sysfs <-> f2fs_unregister_sysfs
      Suggested-by: NChao Yu <yuchao0@huawei.com>
      Reivewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      dc6b2055
    • C
      f2fs: support project quota · 5c57132e
      Chao Yu 提交于
      This patch adds to support plain project quota.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      5c57132e
    • C
      f2fs: enhance on-disk inode structure scalability · 7a2af766
      Chao Yu 提交于
      This patch add new flag F2FS_EXTRA_ATTR storing in inode.i_inline
      to indicate that on-disk structure of current inode is extended.
      
      In order to extend, we changed the inode structure a bit:
      
      Original one:
      
      struct f2fs_inode {
      	...
      	struct f2fs_extent i_ext;
      	__le32 i_addr[DEF_ADDRS_PER_INODE];
      	__le32 i_nid[DEF_NIDS_PER_INODE];
      }
      
      Extended one:
      
      struct f2fs_inode {
              ...
              struct f2fs_extent i_ext;
      	union {
      		struct {
      			__le16 i_extra_isize;
      			__le16 i_padding;
      			__le32 i_extra_end[0];
      		};
      		__le32 i_addr[DEF_ADDRS_PER_INODE];
      	};
              __le32 i_nid[DEF_NIDS_PER_INODE];
      }
      
      Once F2FS_EXTRA_ATTR is set, we will steal four bytes in the head of
      i_addr field for storing i_extra_isize and i_padding. with i_extra_isize,
      we can calculate actual size of reserved space in i_addr, available
      attribute fields included in total extra attribute fields for current
      inode can be described as below:
      
        +--------------------+
        | .i_mode            |
        | ...                |
        | .i_ext             |
        +--------------------+
        | .i_extra_isize     |-----+
        | .i_padding         |     |
        | .i_prjid           |     |
        | .i_atime_extra     |     |
        | .i_ctime_extra     |     |
        | .i_mtime_extra     |<----+
        | .i_inode_cs        |<----- store blkaddr/inline from here
        | .i_xattr_cs        |
        | ...                |
        +--------------------+
        |                    |
        |    block address   |
        |                    |
        +--------------------+
        | .i_nid             |
        +--------------------+
        |   node_footer      |
        | (nid, ino, offset) |
        +--------------------+
      
      Hence, with this patch, we would enhance scalability of f2fs inode for
      storing more newly added attribute.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      7a2af766
    • C
      f2fs: make max inline size changeable · f2470371
      Chao Yu 提交于
      This patch tries to make below macros calculating max inline size,
      inline dentry field size considerring reserving size-changeable
      space:
      - MAX_INLINE_DATA
      - NR_INLINE_DENTRY
      - INLINE_DENTRY_BITMAP_SIZE
      - INLINE_RESERVED_SIZE
      
      Then, when inline_{data,dentry} options is enabled, it allows us to
      reserve inline space with different size flexibly for adding newly
      introduced inode attribute.
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      f2470371
  4. 09 7月, 2017 1 次提交
    • C
      f2fs: support plain user/group quota · 0abd675e
      Chao Yu 提交于
      This patch adds to support plain user/group quota.
      
      Change Note by Jaegeuk Kim.
      
      - Use f2fs page cache for quota files in order to consider garbage collection.
        so, quota files are not tolerable for sudden power-cuts, so user needs to do
        quotacheck.
      
      - setattr() calls dquot_transfer which will transfer inode->i_blocks.
        We can't reclaim that during f2fs_evict_inode(). So, we need to count
        node blocks as well in order to match i_blocks with dquot's space.
      
        Note that, Chao wrote a patch to count inode->i_blocks without inode block.
        (f2fs: don't count inode block in in-memory inode.i_blocks)
      
      - in f2fs_remount, we need to make RW in prior to dquot_resume.
      
      - handle fault_injection case during f2fs_quota_off_umount
      
      - TODO: Project quota
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      0abd675e
  5. 08 7月, 2017 4 次提交
  6. 04 7月, 2017 7 次提交
  7. 05 6月, 2017 1 次提交
  8. 24 5月, 2017 4 次提交
  9. 17 5月, 2017 1 次提交
  10. 04 5月, 2017 2 次提交
  11. 03 5月, 2017 1 次提交
  12. 11 4月, 2017 2 次提交
  13. 06 4月, 2017 2 次提交
  14. 30 3月, 2017 1 次提交
  15. 25 3月, 2017 1 次提交
  16. 22 3月, 2017 2 次提交
    • J
      f2fs: add fault injection on f2fs_truncate · 14b44d23
      Jaegeuk Kim 提交于
      Inject a fault during f2fs_truncate().
      Signed-off-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      14b44d23
    • J
      f2fs: build stat_info before orphan inode recovery · aa51d08a
      Jaegeuk Kim 提交于
      f2fs_sync_fs() -> write_checkpoint() calls stat_inc_cp_count(sbi->stat_info),
      which needs stat_info allocation.
      Otherwise, we can hit:
      
      [254042.598623]  ? count_shadow_nodes+0xa0/0xa0
      [254042.598633]  f2fs_sync_fs+0x65/0xd0 [f2fs]
      [254042.598645]  f2fs_balance_fs_bg+0xe4/0x1c0 [f2fs]
      [254042.598657]  f2fs_write_node_pages+0x34/0x1a0 [f2fs]
      [254042.598664]  ? pagevec_lookup_entries+0x1e/0x30
      [254042.598673]  do_writepages+0x1e/0x30
      [254042.598682]  __writeback_single_inode+0x45/0x330
      [254042.598688]  writeback_single_inode+0xd7/0x190
      [254042.598694]  write_inode_now+0x86/0xa0
      [254042.598699]  iput+0x122/0x200
      [254042.598709]  f2fs_fill_super+0xd4a/0x14d0 [f2fs]
      [254042.598717]  mount_bdev+0x184/0x1c0
      [254042.598934]  ? f2fs_commit_super+0x100/0x100 [f2fs]
      [254042.599142]  f2fs_mount+0x15/0x20 [f2fs]
      [254042.599349]  mount_fs+0x39/0x160
      [254042.599554]  ? __alloc_percpu+0x15/0x20
      [254042.599759]  vfs_kern_mount+0x67/0x110
      [254042.599972]  do_mount+0x1bb/0xc80
      [254042.600175]  ? memdup_user+0x42/0x60
      [254042.600380]  SyS_mount+0x83/0xd0
      [254042.600583]  entry_SYSCALL_64_fastpath+0x1e/0xad
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      aa51d08a
  17. 28 2月, 2017 2 次提交
    • H
      f2fs: add f2fs_drop_inode tracepoint · b8d96a30
      Hou Pengyang 提交于
      Signed-off-by: NHou Pengyang <houpengyang@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      b8d96a30
    • M
      f2fs: Fix zoned block device support · 7bb3a371
      Masato Suzuki 提交于
      The introduction of the multi-device feature partially broke the support
      for zoned block devices. In the function f2fs_scan_devices, sbi->devs
      allocation and initialization is skipped in the case of a single device
      mount. This result in no device information structure being allocated
      for the device. This is fine if the device is a regular device, but in
      the case of a zoned block device, the device zone type array is not
      initialized, which causes the function __f2fs_issue_discard_zone to fail
      as get_blkz_type is unable to determine the zone type of a section.
      
      Fix this by always allocating and initializing the sbi->devs device
      information array even in the case of a single device if that device is
      zoned. For this particular case, make sure to obtain a reference on the
      single device so that the call to blkdev_put() in destroy_device_list
      operates as expected.
      
      Fixes: 3c62be17 ("f2fs: support multiple devices")
      Cc: <stable@vger.kernel.org> # v4.10
      Signed-off-by: NMasato Suzuki <masato.suzuki@wdc.com>
      Acked-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      7bb3a371