Skip to content

Commit 68bf6bf

Browse files
committed
Merge tag 'ext4_for_linus-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o: "Ext4 bug fixes and cleanups, plus some additional kunit tests" * tag 'ext4_for_linus-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (23 commits) ext4: initialize sbi->s_freeclusters_counter and sbi->s_dirtyclusters_counter before use in kunit test ext4: hold group lock in ext4 kunit test ext4: alloc test super block from sget ext4: kunit: use dynamic inode allocation ext4: enable meta_bg only when new desc blocks are needed ext4: remove unused parameter biop in ext4_issue_discard() ext4: remove SLAB_MEM_SPREAD flag usage ext4: verify s_clusters_per_group even without bigalloc ext4: fix corruption during on-line resize ext4: don't report EOPNOTSUPP errors from discard ext4: drop duplicate ea_inode handling in ext4_xattr_block_set() ext4: fold quota accounting into ext4_xattr_inode_lookup_create() ext4: correct best extent lstart adjustment logic ext4: forbid commit inconsistent quota data when errors=remount-ro ext4: add a hint for block bitmap corrupt state in mb_groups ext4: fix the comment of ext4_map_blocks()/ext4_ext_map_blocks() ext4: improve error msg for ext4_mb_seq_groups_show ext4: remove unused buddy_loaded in ext4_mb_seq_groups_show ext4: Add unit test for ext4_mb_mark_diskspace_used ext4: Add unit test for mb_free_blocks ...
2 parents 32a5054 + 0ecae54 commit 68bf6bf

File tree

7 files changed

+679
-108
lines changed

7 files changed

+679
-108
lines changed

fs/ext4/extents.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4111,10 +4111,10 @@ static ext4_lblk_t ext4_ext_determine_insert_hole(struct inode *inode,
41114111
*
41124112
* Need to be called with
41134113
* down_read(&EXT4_I(inode)->i_data_sem) if not allocating file system block
4114-
* (ie, create is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem)
4114+
* (ie, flags is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem)
41154115
*
41164116
* return > 0, number of blocks already mapped/allocated
4117-
* if create == 0 and these are pre-allocated blocks
4117+
* if flags doesn't contain EXT4_GET_BLOCKS_CREATE and these are pre-allocated blocks
41184118
* buffer head is unmapped
41194119
* otherwise blocks are mapped
41204120
*
@@ -4218,7 +4218,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
42184218

42194219
/*
42204220
* requested block isn't allocated yet;
4221-
* we couldn't try to create block if create flag is zero
4221+
* we couldn't try to create block if flags doesn't contain EXT4_GET_BLOCKS_CREATE
42224222
*/
42234223
if ((flags & EXT4_GET_BLOCKS_CREATE) == 0) {
42244224
ext4_lblk_t len;

fs/ext4/inode.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,10 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
465465
* Otherwise, call with ext4_ind_map_blocks() to handle indirect mapping
466466
* based files
467467
*
468-
* On success, it returns the number of blocks being mapped or allocated. if
469-
* create==0 and the blocks are pre-allocated and unwritten, the resulting @map
470-
* is marked as unwritten. If the create == 1, it will mark @map as mapped.
468+
* On success, it returns the number of blocks being mapped or allocated.
469+
* If flags doesn't contain EXT4_GET_BLOCKS_CREATE the blocks are
470+
* pre-allocated and unwritten, the resulting @map is marked as unwritten.
471+
* If the flags contain EXT4_GET_BLOCKS_CREATE, it will mark @map as mapped.
471472
*
472473
* It returns 0 if plain look up failed (blocks have not been allocated), in
473474
* that case, @map is returned as unmapped but we still do fill map->m_len to
@@ -589,8 +590,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
589590
* Returns if the blocks have already allocated
590591
*
591592
* Note that if blocks have been preallocated
592-
* ext4_ext_get_block() returns the create = 0
593-
* with buffer head unmapped.
593+
* ext4_ext_map_blocks() returns with buffer head unmapped
594594
*/
595595
if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED)
596596
/*

0 commit comments

Comments
 (0)