27 Jul, 2020

1 commit


24 Mar, 2020

3 commits


20 Jan, 2020

2 commits

  • btrfsic_process_superblock() BUG_ON()s if 'state' is NULL. But this can
    never happen as the only caller from btrfsic_process_superblock() is
    btrfsic_mount() which allocates 'state' some lines above calling
    btrfsic_process_superblock() and checks for the allocation to succeed.

    Let's just remove the impossible to hit BUG_ON().

    Signed-off-by: Johannes Thumshirn
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Johannes Thumshirn
     
  • A user reports a possible NULL-pointer dereference in
    btrfsic_process_superblock(). We are assigning state->fs_info to a local
    fs_info variable and afterwards checking for the presence of state.

    While we would BUG_ON() a NULL state anyways, we can also just remove
    the local fs_info copy, as fs_info is only used once as the first
    argument for btrfs_num_copies(). There we can just pass in
    state->fs_info as well.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205003
    Signed-off-by: Johannes Thumshirn
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Johannes Thumshirn
     

09 Sep, 2019

1 commit

  • btrfsic_process_written_block() cals btrfsic_process_metablock(),
    which has a fairly large stack usage due to the btrfsic_stack_frame
    variable. It also calls btrfsic_test_for_metadata(), which now
    needs several hundreds of bytes for its SHASH_DESC_ON_STACK().

    In some configurations, we end up with both functions on the
    same stack, and gcc warns about the excessive stack usage that
    might cause the available stack space to run out:

    fs/btrfs/check-integrity.c:1743:13: error: stack frame size of 1152 bytes in function 'btrfsic_process_written_block' [-Werror,-Wframe-larger-than=]

    Marking both child functions as noinline_for_stack helps because
    this guarantees that the large variables are not on the same
    stack frame.

    Fixes: d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming")
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Arnd Bergmann
    Signed-off-by: David Sterba

    Arnd Bergmann
     

01 Jul, 2019

2 commits

  • Currently btrfs_csum_data() relied on the crc32c() wrapper around the
    crypto framework for calculating the CRCs.

    As we have our own crypto_shash structure in the fs_info now, we can
    directly call into the crypto framework without going trough the wrapper.

    This way we can even remove the btrfs_csum_data() and btrfs_csum_final()
    wrappers.

    The module dependency on crc32c is preserved via MODULE_SOFTDEP("pre:
    crc32c"), which was previously provided by LIBCRC32C config option doing
    the same.

    Signed-off-by: Johannes Thumshirn
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Johannes Thumshirn
     
  • btrfsic_test_for_metadata() directly calls the crc32c() library function
    for calculating the CRC32C checksum, but then uses btrfs_csum_final() to
    invert the result.

    To ease further refactoring and development around checksumming in BTRFS
    convert to calling btrfs_csum_data(), which is a wrapper around
    crc32c().

    Reviewed-by: Nikolay Borisov
    Signed-off-by: Johannes Thumshirn
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Johannes Thumshirn
     

17 Dec, 2018

4 commits

  • The typos accumulate over time so once in a while time they get fixed in
    a large patch.

    Signed-off-by: Andrea Gelmini
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Andrea Gelmini
     
  • When using a 'var & (PAGE_SIZE - 1)' construct one is checking for a page
    alignment and thus should use the PAGE_ALIGNED() macro instead of
    open-coding it.

    Convert all open-coded occurrences of PAGE_ALIGNED().

    Reviewed-by: Nikolay Borisov
    Signed-off-by: Johannes Thumshirn
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Johannes Thumshirn
     
  • Constructs like 'var & (PAGE_SIZE - 1)' or 'var & ~PAGE_MASK' can denote an
    offset into a page.

    So replace them by the offset_in_page() macro instead of open-coding it if
    they're not used as an alignment check.

    Reviewed-by: Nikolay Borisov
    Signed-off-by: Johannes Thumshirn
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Johannes Thumshirn
     
  • Currently btrfs_fs_info structure contains a copy of the
    fsid/metadata_uuid fields. Same values are also contained in the
    btrfs_fs_devices structure which fs_info has a reference to. Let's
    reduce duplication by removing the fields from fs_info and always refer
    to the ones in fs_devices. No functional changes.

    Signed-off-by: Nikolay Borisov
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Nikolay Borisov
     

15 Oct, 2018

1 commit


06 Aug, 2018

2 commits

  • The helper is trivial and marked as deprecated.

    Signed-off-by: David Sterba

    David Sterba
     
  • Commit f8f84b2dfda5 ("btrfs: index check-integrity state hash by a dev_t")
    changed how btrfsic indexes device state.

    Now we need to access device->bdev->bd_dev, while for degraded mount
    it's completely possible to have device->bdev as NULL, thus it will
    trigger a NULL pointer dereference at mount time.

    Fix it by checking if the device is degraded before accessing
    device->bdev->bd_dev.

    There are a lot of other places accessing device->bdev->bd_dev, however
    the other call sites have either checked device->bdev, or the
    device->bdev is passed from btrfsic_map_block(), so it won't cause harm.

    Fixes: f8f84b2dfda5 ("btrfs: index check-integrity state hash by a dev_t")
    Signed-off-by: Qu Wenruo
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Qu Wenruo
     

13 Jun, 2018

1 commit

  • The kzalloc() function has a 2-factor argument form, kcalloc(). This
    patch replaces cases of:

    kzalloc(a * b, gfp)

    with:
    kcalloc(a * b, gfp)

    as well as handling cases of:

    kzalloc(a * b * c, gfp)

    with:

    kzalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kzalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kzalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kzalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kzalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kzalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kzalloc
    + kcalloc
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kzalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kzalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kzalloc(sizeof(THING) * C2, ...)
    |
    kzalloc(sizeof(TYPE) * C2, ...)
    |
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(C1 * C2, ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

12 Apr, 2018

1 commit


26 Mar, 2018

1 commit

  • The custom crc32 init code was introduced in
    14a958e678cd ("Btrfs: fix btrfs boot when compiled as built-in") to
    enable using btrfs as a built-in. However, later as pointed out by
    60efa5eb2e88 ("Btrfs: use late_initcall instead of module_init") this
    wasn't enough and finally btrfs was switched to late_initcall which
    comes after the generic crc32c implementation is initiliased. The
    latter commit superseeded the former. Now that we don't have to
    maintain our own code let's just remove it and switch to using the
    generic implementation.

    Despite touching a lot of files the patch is really simple. Here is the gist of
    the changes:

    1. Select LIBCRC32C rather than the low-level modules.
    2. s/btrfs_crc32c/crc32c/g
    3. replace hash.h with linux/crc32c.h
    4. Move the btrfs namehash funcs to ctree.h and change the tree accordingly.

    I've tested this with btrfs being both a module and a built-in and xfstest
    doesn't complain.

    Does seem to fix the longstanding problem of not automatically selectiong
    the crc32c module when btrfs is used. Possibly there is a workaround in
    dracut.

    The modinfo confirms that now all the module dependencies are there:

    before:
    depends: zstd_compress,zstd_decompress,raid6_pq,xor,zlib_deflate

    after:
    depends: libcrc32c,zstd_compress,zstd_decompress,raid6_pq,xor,zlib_deflate

    Signed-off-by: Nikolay Borisov
    Reviewed-by: David Sterba
    [ add more info to changelog from mails ]
    Signed-off-by: David Sterba

    Nikolay Borisov
     

02 Nov, 2017

1 commit

  • Fix bug of commit 74d46992e0d9 ("block: replace bi_bdev with a gendisk
    pointer and partitions index").

    bio_dev(bio) is used to find the dev state in function
    __btrfsic_submit_bio. But when dev_state is added to the hashtable, it
    is using dev_t of block_device.

    bio_dev(bio) returns a dev_t of part0 which is different from dev_t in
    block_device(bd_dev). bd_dev in block_device represents the exact
    partition.

    block_device.bd_dev =
    bio->bi_partno (same as block_device.bd_partno) + bio_dev(bio).

    When adding a dev_state into hashtable, we use the exact partition dev_t.
    So when looking it up, it should also use the exact partition dev_t.

    Reproducer of this bug:

    Use MOUNT_OPTIONS="-o check_int" and run btrfs/001 in fstests.
    Then there will be WARNING like below.

    WARNING:
    btrfs: attempt to write superblock which references block M @29523968 (sda7 /1111654400/2) which is never written!

    Signed-off-by: Gu JinXiang
    Reviewed-by: David Sterba
    Signed-off-by: David Sterba

    Gu JinXiang
     

30 Oct, 2017

2 commits

  • Fix missing change from commit f8f84b2dfda5
    ("btrfs: index check-integrity state hash by a dev_t").

    Function btrfsic_dev_state_hashtable_lookup uses dev_t to generate hashval
    when look in up a btrfsic_dev_state in hash table. So when we add a
    btrfsic_dev_state into the hash table, it should also use dev_t.

    Reproducer of this bug:
    Use MOUNT_OPTIONS="-o check_int" when running xfstest, device can not be
    mounted successfully. So xfstest can not run.

    Signed-off-by: Gu JinXiang
    Reviewed-by: Nikolay Borisov
    Signed-off-by: David Sterba

    Gu JinXiang
     
  • Forward the correct return value -ENOMEM from btrfsic_dev_state_alloc()
    too.

    Signed-off-by: Allen Pais
    Reviewed-by: Anand Jain
    Reviewed-by: David Sterba
    [ adjust changelog ]
    Signed-off-by: David Sterba

    Allen Pais
     

10 Sep, 2017

1 commit

  • Pull btrfs updates from David Sterba:
    "The changes range through all types: cleanups, core chagnes, sanity
    checks, fixes, other user visible changes, detailed list below:

    - deprecated: user transaction ioctl

    - mount option ssd does not change allocation alignments

    - degraded read-write mount is allowed if all the raid profile
    constraints are met, now based on more accurate check

    - defrag: do not reset compression afterwards; the NOCOMPRESS flag
    can be now overriden by defrag

    - prep work for better extent reference tracking (related to the
    qgroup slowness with balance)

    - prep work for compression heuristics

    - memory allocation reductions (may help latencies on a loaded
    system)

    - better accounting for io waiting states

    - error handling improvements (removed BUGs)

    - added more sanity checks for shared refs

    - fix readdir vs pagefault deadlock under some circumstances

    - fix for 'no-hole' mode, certain combination of compressed and
    inline extents

    - send: fix emission of invalid clone operations

    - fixup file mode if setting acls fail

    - more fixes from fuzzing

    - oher cleanups"

    * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (104 commits)
    btrfs: submit superblock io with REQ_META and REQ_PRIO
    btrfs: remove unnecessary memory barrier in btrfs_direct_IO
    btrfs: remove superfluous chunk_tree argument from btrfs_alloc_dev_extent
    btrfs: Remove chunk_objectid parameter of btrfs_alloc_dev_extent
    btrfs: pass fs_info to btrfs_del_root instead of tree_root
    Btrfs: add one more sanity check for shared ref type
    Btrfs: remove BUG_ON in __add_tree_block
    Btrfs: remove BUG() in add_data_reference
    Btrfs: remove BUG() in print_extent_item
    Btrfs: remove BUG() in btrfs_extent_inline_ref_size
    Btrfs: convert to use btrfs_get_extent_inline_ref_type
    Btrfs: add a helper to retrive extent inline ref type
    btrfs: scrub: simplify scrub worker initialization
    btrfs: scrub: clean up division in scrub_find_csum
    btrfs: scrub: clean up division in __scrub_mark_bitmap
    btrfs: scrub: use bool for flush_all_writes
    btrfs: preserve i_mode if __btrfs_set_acl() fails
    btrfs: Remove extraneous chunk_objectid variable
    btrfs: Remove chunk_objectid argument from btrfs_make_block_group
    btrfs: Remove extra parentheses from condition in copy_items()
    ...

    Linus Torvalds
     

24 Aug, 2017

2 commits

  • This way we don't need a block_device structure to submit I/O. The
    block_device has different life time rules from the gendisk and
    request_queue and is usually only available when the block device node
    is open. Other callers need to explicitly create one (e.g. the lightnvm
    passthrough code, or the new nvme multipathing code).

    For the actual I/O path all that we need is the gendisk, which exists
    once per block device. But given that the block layer also does
    partition remapping we additionally need a partition index, which is
    used for said remapping in generic_make_request.

    Note that all the block drivers generally want request_queue or
    sometimes the gendisk, so this removes a layer of indirection all
    over the stack.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • We won't have the struct block_device available in the bio soon, so switch
    to the numerical dev_t instead of the block_device pointer for looking up
    the check-integrity state.

    Reviewed-by: Liu Bo
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

18 Aug, 2017

1 commit


16 Aug, 2017

1 commit


06 Jul, 2017

1 commit

  • Pull btrfs updates from David Sterba:
    "The core updates improve error handling (mostly related to bios), with
    the usual incremental work on the GFP_NOFS (mis)use removal,
    refactoring or cleanups. Except the two top patches, all have been in
    for-next for an extensive amount of time.

    User visible changes:

    - statx support

    - quota override tunable

    - improved compression thresholds

    - obsoleted mount option alloc_start

    Core updates:

    - bio-related updates:
    - faster bio cloning
    - no allocation failures
    - preallocated flush bios

    - more kvzalloc use, memalloc_nofs protections, GFP_NOFS updates

    - prep work for btree_inode removal

    - dir-item validation

    - qgoup fixes and updates

    - cleanups:
    - removed unused struct members, unused code, refactoring
    - argument refactoring (fs_info/root, caller -> callee sink)
    - SEARCH_TREE ioctl docs"

    * 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (115 commits)
    btrfs: Remove false alert when fiemap range is smaller than on-disk extent
    btrfs: Don't clear SGID when inheriting ACLs
    btrfs: fix integer overflow in calc_reclaim_items_nr
    btrfs: scrub: fix target device intialization while setting up scrub context
    btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges
    btrfs: qgroup: Introduce extent changeset for qgroup reserve functions
    btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quotas being enabled
    btrfs: qgroup: Return actually freed bytes for qgroup release or free data
    btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function
    btrfs: qgroup: Add quick exit for non-fs extents
    Btrfs: rework delayed ref total_bytes_pinned accounting
    Btrfs: return old and new total ref mods when adding delayed refs
    Btrfs: always account pinned bytes when dropping a tree block ref
    Btrfs: update total_bytes_pinned when pinning down extents
    Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT()
    Btrfs: make add_pinned_bytes() take an s64 num_bytes instead of u64
    btrfs: fix validation of XATTR_ITEM dir items
    btrfs: Verify dir_item in iterate_object_props
    btrfs: Check name_len before in btrfs_del_root_ref
    btrfs: Check name_len before reading btrfs_get_name
    ...

    Linus Torvalds
     

20 Jun, 2017

5 commits


09 Jun, 2017

1 commit

  • Replace bi_error with a new bi_status to allow for a clear conversion.
    Note that device mapper overloaded bi_error with a private value, which
    we'll have to keep arround at least for now and thus propagate to a
    proper blk_status_t value.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

06 Dec, 2016

5 commits


30 Nov, 2016

1 commit

  • And remove the bogus check for a NULL return value from kmap, which
    can't happen. While we're at it: I don't think that kmapping up to 256
    will work without deadlocks on highmem machines, a better idea would
    be to use vm_map_ram to map all of them into a single virtual address
    range. Incidentally that would also simplify the code a lot.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Omar Sandoval
    Signed-off-by: David Sterba

    Christoph Hellwig