1. 06 9月, 2017 3 次提交
  2. 30 8月, 2017 8 次提交
  3. 22 8月, 2017 8 次提交
  4. 16 8月, 2017 5 次提交
  5. 10 8月, 2017 3 次提交
  6. 04 8月, 2017 5 次提交
  7. 01 8月, 2017 8 次提交
    • 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
    • C
      f2fs: support F2FS_IOC_FS{GET,SET}XATTR · 2c1d0305
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      2c1d0305
    • J
      f2fs: don't need to wait for node writes for atomic write · b6a245eb
      Jaegeuk Kim 提交于
      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: NJaegeuk Kim <jaegeuk@kernel.org>
      b6a245eb
    • 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: record quota during dot{,dot} recovery · a6d3a479
      Chao Yu 提交于
      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: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      a6d3a479
    • 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