1. 05 Sep, 2017 4 commits
  2. 29 Aug, 2017 8 commits
  3. 21 Aug, 2017 8 commits
  4. 15 Aug, 2017 5 commits
  5. 10 Aug, 2017 3 commits
  6. 04 Aug, 2017 5 commits
  7. 31 Jul, 2017 7 commits
    • Chao Yu's avatar
      f2fs: introduce f2fs_statfs_project · ddc34e32
      Chao Yu authored
      This patch introduces f2fs_statfs_project, it enables to show usage
      status of directory tree which is limited with project quota.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      ddc34e32
    • Chao Yu's avatar
      f2fs: support F2FS_IOC_FS{GET,SET}XATTR · 2c1d0305
      Chao Yu authored
      This patch adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR ioctl interface
      support for f2fs. The interface is kept consistent with the one
      of ext4/xfs.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      2c1d0305
    • Jaegeuk Kim's avatar
      f2fs: don't need to wait for node writes for atomic write · b6a245eb
      Jaegeuk Kim authored
      We have a node chain to serialize node block writes, so if any IOs for
      node block writes are reordered, we'll get broken node chain. IOWs,
      roll-forward recovery will see all or none node blocks given fsync
      mark.
      
      E.g.,
      Node chain consists of:
       N1 -> N2 -> N3 -> NFSYNC -> N1' -> N2' -> N'FSYNC
      
      Reordered to:
      1) N1 -> N2 -> N3 -> N2' -> NFSYNC -> N'FSYNC -> power-cut
      2) N1 -> N2 -> N3 -> N1' -> NFSYNC -> power-cut
      3) N1 -> N2 -> NFSYNC -> N1' -> N'FSYNC -> N3 -> power-cut
      4) N1 -> NFSYNC -> N1' -> N2' -> N'FSYNC -> N3 -> power-cut
      
      Roll-forward recovery can proceed to:
      1) N1 -> N2 -> N3 -> NFSYNC -> X
      2) N1 -> N2 -> N3 -> NFSYNC -> N1' -> X
      3) N1 -> N2 -> N3 -> FSYNC -> N1' -> X
      4) N1 -> X
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      b6a245eb
    • Jaegeuk Kim's avatar
      f2fs: avoid naming confusion of sysfs init · dc6b2055
      Jaegeuk Kim authored
      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: default avatarChao Yu <yuchao0@huawei.com>
      Reivewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      dc6b2055
    • Chao Yu's avatar
      f2fs: support project quota · 5c57132e
      Chao Yu authored
      This patch adds to support plain project quota.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      5c57132e
    • Chao Yu's avatar
      f2fs: record quota during dot{,dot} recovery · a6d3a479
      Chao Yu authored
      In ->lookup(), we will have a try to recover dot or dotdot for
      corrupted directory, once disk quota is on, if it allocates new
      block during dotdot recovery, we need to record disk quota info
      for the allocation, so this patch fixes this issue by adding
      missing dquot_initialize() in __recover_dot_dentries.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      a6d3a479
    • Chao Yu's avatar
      f2fs: enhance on-disk inode structure scalability · 7a2af766
      Chao Yu authored
      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: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      7a2af766