1. 24 2月, 2017 14 次提交
  2. 23 2月, 2017 23 次提交
  3. 29 1月, 2017 3 次提交
    • J
      f2fs: relax async discard commands more · 4e6a8d9b
      Jaegeuk Kim 提交于
      This patch relaxes async discard commands to avoid waiting its end_io during
      checkpoint.
      Instead of waiting them during checkpoint, it will be done when actually reusing
      them.
      
      Test on initial partition of nvme drive.
      
       # time fstrim /mnt/test
      
      Before : 6.158s
      After : 4.822s
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      4e6a8d9b
    • J
      f2fs: drop exist_data for inline_data when truncated to 0 · bb95d9ab
      Jaegeuk Kim 提交于
      A test program gets the SEEK_DATA with two values between
      a new created file and the exist file on f2fs filesystem.
      
      F2FS filesystem,  (the first "test1" is a new file)
      SEEK_DATA size != 0 (offset = 8192)
      SEEK_DATA size != 0 (offset = 4096)
      
      PNFS filesystem, (the first "test1" is a new file)
      SEEK_DATA size != 0 (offset = 4096)
      SEEK_DATA size != 0 (offset = 4096)
      
      int main(int argc, char **argv)
      {
              char *filename = argv[1];
              int offset = 1, i = 0, fd = -1;
      
              if (argc < 2) {
                      printf("Usage: %s f2fsfilename\n", argv[0]);
                      return -1;
              }
      
              /*
              if (!access(filename, F_OK) || errno != ENOENT) {
                      printf("Needs a new file for test, %m\n");
                      return -1;
              }*/
      
              fd = open(filename, O_RDWR | O_CREAT, 0777);
              if (fd < 0) {
                      printf("Create test file %s failed, %m\n", filename);
                      return -1;
              }
      
              for (i = 0; i < 20; i++) {
                      offset = 1 << i;
                      ftruncate(fd, 0);
                      lseek(fd, offset, SEEK_SET);
                      write(fd, "test", 5);
                      /* Get the alloc size by seek data equal zero*/
                      if (lseek(fd, 0, SEEK_DATA)) {
                              printf("SEEK_DATA size != 0 (offset = %d)\n", offset);
                              break;
                      }
              }
      
              close(fd);
              return 0;
      }
      Reported-and-Tested-by: NKinglong Mee <kinglongmee@gmail.com>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      bb95d9ab
    • J
      f2fs: don't allow encrypted operations without keys · 363fa4e0
      Jaegeuk Kim 提交于
      This patch fixes the renaming bug on encrypted filenames, which was pointed by
      
       (ext4: don't allow encrypted operations without keys)
      
      Cc: Theodore Ts'o <tytso@mit.edu>
      Reviewed-by: NChao Yu <yuchao0@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      363fa4e0