12 Feb, 2020

1 commit

  • Pull dax fixes from Dan Williams:
    "A fix for an xfstest failure and some and an update that removes an
    fsdax dependency on block devices.

    Summary:

    - Fix RWF_NOWAIT writes to properly return -EAGAIN

    - Clean up an unused helper

    - Update dax_writeback_mapping_range to not need a block_device
    argument"

    * tag 'dax-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    dax: pass NOWAIT flag to iomap_apply
    dax: Get rid of fs_dax_get_by_host() helper
    dax: Pass dax_dev instead of bdev to dax_writeback_mapping_range()

    Linus Torvalds
     

06 Jan, 2020

1 commit

  • Clang warns:

    ../fs/ext2/super.c:1076:3: warning: misleading indentation; statement is
    not part of the previous 'if' [-Wmisleading-indentation]
    sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
    ^
    ../fs/ext2/super.c:1074:2: note: previous statement is here
    if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
    ^
    1 warning generated.

    This warning occurs because there is a space before the tab on this
    line. Remove it so that the indentation is consistent with the Linux
    kernel coding style and clang no longer warns.

    Fixes: 41f04d852e35 ("[PATCH] ext2: fix mounts at 16T")
    Link: https://github.com/ClangBuiltLinux/linux/issues/827
    Link: https://lore.kernel.org/r/20191218031930.31393-1-natechancellor@gmail.com
    Signed-off-by: Nathan Chancellor
    Signed-off-by: Jan Kara

    Nathan Chancellor
     

04 Jan, 2020

1 commit

  • As of now dax_writeback_mapping_range() takes "struct block_device" as a
    parameter and dax_dev is searched from bdev name. This also involves taking
    a fresh reference on dax_dev and putting that reference at the end of
    function.

    We are developing a new filesystem virtio-fs and using dax to access host
    page cache directly. But there is no block device. IOW, we want to make
    use of dax but want to get rid of this assumption that there is always
    a block device associated with dax_dev.

    So pass in "struct dax_device" as parameter instead of bdev.

    ext2/ext4/xfs are current users and they already have a reference on
    dax_device. So there is no need to take reference and drop reference to
    dax_device on each call of this function.

    Suggested-by: Christoph Hellwig
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Jan Kara
    Signed-off-by: Vivek Goyal
    Link: https://lore.kernel.org/r/20200103183307.GB13350@redhat.com
    Signed-off-by: Dan Williams

    Vivek Goyal
     

16 Dec, 2019

1 commit


01 Dec, 2019

1 commit

  • Pull ext2, quota, reiserfs cleanups and fixes from Jan Kara:

    - Refactor the quota on/off kernel internal interfaces (mostly for
    ubifs quota support as ubifs does not want to have inodes holding
    quota information)

    - A few other small quota fixes and cleanups

    - Various small ext2 fixes and cleanups

    - Reiserfs xattr fix and one cleanup

    * tag 'for_v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (28 commits)
    ext2: code cleanup for descriptor_loc()
    fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
    ext2: fix improper function comment
    ext2: code cleanup for ext2_try_to_allocate()
    ext2: skip unnecessary operations in ext2_try_to_allocate()
    ext2: Simplify initialization in ext2_try_to_allocate()
    ext2: code cleanup by calling ext2_group_last_block_no()
    ext2: introduce new helper ext2_group_last_block_no()
    reiserfs: replace open-coded atomic_dec_and_mutex_lock()
    ext2: check err when partial != NULL
    quota: Handle quotas without quota inodes in dquot_get_state()
    quota: Make dquot_disable() work without quota inodes
    quota: Drop dquot_enable()
    fs: Use dquot_load_quota_inode() from filesystems
    quota: Rename vfs_load_quota_inode() to dquot_load_quota_inode()
    quota: Simplify dquot_resume()
    quota: Factor out setup of quota inode
    quota: Check that quota is not dirty before release
    quota: fix livelock in dquot_writeback_dquots
    ext2: don't set *count in the case of failure in ext2_try_to_allocate()
    ...

    Linus Torvalds
     

20 Nov, 2019

1 commit


07 Nov, 2019

4 commits


06 Nov, 2019

2 commits


05 Nov, 2019

1 commit

  • Check err when partial == NULL is meaningless because
    partial == NULL means getting branch successfully without
    error.

    CC: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20191105045100.7104-1-cgxu519@mykernel.net
    Signed-off-by: Chengguang Xu
    Signed-off-by: Jan Kara

    Chengguang Xu
     

31 Oct, 2019

1 commit

  • Currently we set *count to num(value 0) in the failure
    of block allocation in ext2_try_to_allocate(). Without
    reservation, we reuse *count(value 0) to retry block
    allocation and wrong *count will cause only allocating
    maximum 1 block even though having sufficent free blocks
    in that block group. Finally, it probably cause significant
    fragmentation.

    Link: https://lore.kernel.org/r/20191026090721.23794-1-cgxu519@mykernel.net
    Signed-off-by: Chengguang Xu
    Signed-off-by: Jan Kara

    Chengguang Xu
     

24 Oct, 2019

1 commit


22 Oct, 2019

1 commit


21 Oct, 2019

2 commits

  • The srcmap is used to identify where the read is to be performed from.
    It is passed to ->iomap_begin, which can fill it in if we need to read
    data for partially written blocks from a different location than the
    write target. The srcmap is only supported for buffered writes so far.

    Signed-off-by: Goldwyn Rodrigues
    [hch: merged two patches, removed the IOMAP_F_COW flag, use iomap as
    srcmap if not set, adjust length down to srcmap end as well]
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Darrick J. Wong
    Signed-off-by: Darrick J. Wong
    Acked-by: Goldwyn Rodrigues

    Goldwyn Rodrigues
     
  • Set block num to original *count in a case
    of retrying allocation in case num < *count

    Link: https://lore.kernel.org/r/20191020232326.84881-1-cgxu519@mykernel.net
    Signed-off-by: Chengguang Xu
    Signed-off-by: Jan Kara

    Chengguang Xu
     

22 Sep, 2019

1 commit

  • Pull ext2, quota, udf fixes and cleanups from Jan Kara:

    - two small quota fixes (in grace time handling and possible missed
    accounting of preallocated blocks beyond EOF).

    - some ext2 cleanups

    - udf fixes for better compatibility with Windows 10 generated media
    (named streams, write-protection using domain-identifier, placement
    of volume recognition sequence)

    - some udf cleanups

    * tag 'for_v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    quota: fix wrong condition in is_quota_modification()
    fs-udf: Delete an unnecessary check before brelse()
    ext2: Delete an unnecessary check before brelse()
    udf: Drop forward function declarations
    udf: Verify domain identifier fields
    udf: augment UDF permissions on new inodes
    udf: Use dynamic debug infrastructure
    udf: reduce leakage of blocks related to named streams
    udf: prevent allocation beyond UDF partition
    quota: fix condition for resetting time limit in do_set_dqblk()
    ext2: code cleanup for ext2_free_blocks()
    ext2: fix block range in ext2_data_block_valid()
    udf: support 2048-byte spacing of VRS descriptors on 4K media
    udf: refactor VRS descriptor identification

    Linus Torvalds
     

05 Sep, 2019

1 commit

  • The brelse() function tests whether its argument is NULL
    and then returns immediately.
    Thus the test around the call is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Link: https://lore.kernel.org/r/51dea296-2207-ebc0-bac3-13f3e5c3b235@web.de
    Signed-off-by: Jan Kara

    Markus Elfring
     

30 Aug, 2019

1 commit

  • Fill in the appropriate limits to avoid inconsistencies
    in the vfs cached inode times when timestamps are
    outside the permitted range.

    Even though some filesystems are read-only, fill in the
    timestamps to reflect the on-disk representation.

    Signed-off-by: Deepa Dinamani
    Reviewed-by: Darrick J. Wong
    Acked-By: Tigran Aivazian
    Acked-by: Jeff Layton
    Cc: aivazian.tigran@gmail.com
    Cc: al@alarsen.net
    Cc: coda@cs.cmu.edu
    Cc: darrick.wong@oracle.com
    Cc: dushistov@mail.ru
    Cc: dwmw2@infradead.org
    Cc: hch@infradead.org
    Cc: jack@suse.com
    Cc: jaharkes@cs.cmu.edu
    Cc: luisbg@kernel.org
    Cc: nico@fluxnic.net
    Cc: phillip@squashfs.org.uk
    Cc: richard@nod.at
    Cc: salah.triki@gmail.com
    Cc: shaggy@kernel.org
    Cc: linux-xfs@vger.kernel.org
    Cc: codalist@coda.cs.cmu.edu
    Cc: linux-ext4@vger.kernel.org
    Cc: linux-mtd@lists.infradead.org
    Cc: jfs-discussion@lists.sourceforge.net
    Cc: reiserfs-devel@vger.kernel.org

    Deepa Dinamani
     

31 Jul, 2019

2 commits


13 Jul, 2019

1 commit

  • Pull common SETFLAGS/FSSETXATTR parameter checking from Darrick Wong:
    "Here's a patch series that sets up common parameter checking functions
    for the FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctl implementations.

    The goal here is to reduce the amount of behaviorial variance between
    the filesystems where those ioctls originated (ext2 and XFS,
    respectively) and everybody else.

    - Standardize parameter checking for the SETFLAGS and FSSETXATTR
    ioctls (which were the file attribute setters for ext4 and xfs and
    have now been hoisted to the vfs)

    - Only allow the DAX flag to be set on files and directories"

    * tag 'vfs-fix-ioctl-checking-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
    vfs: only allow FSSETXATTR to set DAX flag on files and dirs
    vfs: teach vfs_ioc_fssetxattr_check to check extent size hints
    vfs: teach vfs_ioc_fssetxattr_check to check project id info
    vfs: create a generic checking function for FS_IOC_FSSETXATTR
    vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

    Linus Torvalds
     

11 Jul, 2019

1 commit

  • Pull ext2, udf and quota updates from Jan Kara:

    - some ext2 fixes and cleanups

    - a fix of udf bug when extending files

    - a fix of quota Q_XGETQSTAT[V] handling

    * tag 'for_v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    udf: Fix incorrect final NOT_ALLOCATED (hole) extent length
    ext2: Use kmemdup rather than duplicating its implementation
    quota: honor quota type in Q_XGETQSTAT[V] calls
    ext2: Always brelse bh on failure in ext2_iget()
    ext2: add missing brelse() in ext2_iget()
    ext2: Fix a typo in ext2_getattr argument
    ext2: fix a typo in comment
    ext2: add missing brelse() in ext2_new_inode()
    ext2: optimize ext2_xattr_get()
    ext2: introduce new helper for xattr entry comparison
    ext2: merge xattr next entry check to ext2_xattr_entry_valid()
    ext2: code cleanup for ext2_preread_inode()
    ext2: code cleanup by using test_opt() and clear_opt()
    doc: ext2: update description of quota options for ext2
    ext2: Strengthen xattr block checks
    ext2: Merge loops in ext2_xattr_set()
    ext2: introduce helper for xattr entry validation
    ext2: introduce helper for xattr header validation
    quota: add dqi_dirty_list description to comment of Dquot List Management

    Linus Torvalds
     

03 Jul, 2019

1 commit

  • kmemdup is introduced to duplicate a region of memory in a neat way.
    Rather than kmalloc/kzalloc + memset, which the programmer needs to
    write the size twice (sometimes lead to mistakes), kmemdup improves
    readability, leads to smaller code and also reduce the chances of mistakes.
    Suggestion to use kmemdup rather than using kmalloc/kzalloc + memset.

    Signed-off-by: Fuqian Huang
    Link: https://lore.kernel.org/r/20190703131727.25735-1-huangfq.daxian@gmail.com
    Signed-off-by: Jan Kara

    Fuqian Huang
     

01 Jul, 2019

1 commit

  • Create a generic function to check incoming FS_IOC_SETFLAGS flag values
    and later prepare the inode for updates so that we can standardize the
    implementations that follow ext4's flag values.

    Note that the efivarfs implementation no longer fails a no-op SETFLAGS
    without CAP_LINUX_IMMUTABLE since that's the behavior in ext*.

    Signed-off-by: Darrick J. Wong
    Reviewed-by: Jan Kara
    Reviewed-by: Christoph Hellwig
    Acked-by: David Sterba
    Reviewed-by: Bob Peterson

    Darrick J. Wong
     

20 Jun, 2019

2 commits


12 Jun, 2019

2 commits


30 May, 2019

1 commit


28 May, 2019

4 commits


21 May, 2019

2 commits


20 May, 2019

2 commits