18 Mar, 2016

1 commit

  • This patch adds the renamed functions moved from the f2fs crypto files.

    1. definitions for per-file encryption used by ext4 and f2fs.

    2. crypto.c for encrypt/decrypt functions
    a. IO preparation:
    - fscrypt_get_ctx / fscrypt_release_ctx
    b. before IOs:
    - fscrypt_encrypt_page
    - fscrypt_decrypt_page
    - fscrypt_zeroout_range
    c. after IOs:
    - fscrypt_decrypt_bio_pages
    - fscrypt_pullback_bio_page
    - fscrypt_restore_control_page

    3. policy.c supporting context management.
    a. For ioctls:
    - fscrypt_process_policy
    - fscrypt_get_policy
    b. For context permission
    - fscrypt_has_permitted_context
    - fscrypt_inherit_context

    4. keyinfo.c to handle permissions
    - fscrypt_get_encryption_info
    - fscrypt_free_encryption_info

    5. fname.c to support filename encryption
    a. general wrapper functions
    - fscrypt_fname_disk_to_usr
    - fscrypt_fname_usr_to_disk
    - fscrypt_setup_filename
    - fscrypt_free_filename

    b. specific filename handling functions
    - fscrypt_fname_alloc_buffer
    - fscrypt_fname_free_buffer

    6. Makefile and Kconfig

    Cc: Al Viro
    Signed-off-by: Michael Halcrow
    Signed-off-by: Ildar Muslukhov
    Signed-off-by: Uday Savagaonkar
    Signed-off-by: Theodore Ts'o
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     

05 Aug, 2015

2 commits

  • This patch moves extent cache related code from data.c into extent_cache.c
    since extent cache is independent feature, and its codes are not relate to
    others in data.c, it's better for us to maintain them in separated place.

    There is no functionality change, but several small coding style fixes
    including:
    * rename __drop_largest_extent to f2fs_drop_largest_extent for exporting;
    * rename misspelled word 'untill' to 'until';
    * remove unneeded 'return' in the end of f2fs_destroy_extent_tree().

    Signed-off-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Chao Yu
     
  • This patch introduces a shrinker targeting to reduce memory footprint consumed
    by a number of in-memory f2fs data structures.

    In addition, it newly adds:
    - sbi->umount_mutex to avoid data races on shrinker and put_super
    - sbi->shruinker_run_no to not revisit objects

    Note that the basic implementation was copied from fs/ubifs/shrinker.c

    Reviewed-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     

29 May, 2015

4 commits

  • This patch adds filename encryption infra.
    Most of codes are copied from ext4 part, but changed to adjust f2fs
    directory structure.

    Signed-off-by: Uday Savagaonkar
    Signed-off-by: Ildar Muslukhov
    Signed-off-by: Michael Halcrow
    Signed-off-by: Theodore Ts'o
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • This patch copies from encrypt_key.c in ext4, and modifies for f2fs.

    Use GFP_NOFS, since _f2fs_get_encryption_info is called under f2fs_lock_op.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Ildar Muslukhov
    Signed-off-by: Theodore Ts'o
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • Most of parts were copied from ext4, except:

    - add f2fs_restore_and_release_control_page which returns control page and
    restore control page
    - remove ext4_encrypted_zeroout()
    - remove sbi->s_file_encryption_mode & sbi->s_dir_encryption_mode
    - add f2fs_end_io_crypto_work for mpage_end_io

    Signed-off-by: Michael Halcrow
    Signed-off-by: Ildar Muslukhov
    Signed-off-by: Theodore Ts'o
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • This patch adds encryption policy and password salt support through ioctl
    implementation.

    It adds three ioctls:
    F2FS_IOC_SET_ENCRYPTION_POLICY,
    F2FS_IOC_GET_ENCRYPTION_POLICY,
    F2FS_IOC_GET_ENCRYPTION_PWSALT, which use xattr operations.

    Note that, these definition and codes are taken from ext4 crypto support.
    For f2fs, xattr operations and on-disk flags for superblock and inode were
    changed.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Theodore Ts'o
    Signed-off-by: Ildar Muslukhov
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     

10 Jan, 2015

1 commit


26 Dec, 2013

1 commit

  • Functions to implement inline data read/write, and move inline data to
    normal data block when file size exceeds inline data limitation.

    Signed-off-by: Huajun Li
    Signed-off-by: Haicheng Li
    Signed-off-by: Weihong Xu
    Signed-off-by: Jaegeuk Kim

    Huajun Li
     

11 Dec, 2012

1 commit