Skip to content

Commit 9b03992

Browse files
committed
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o: "Fix some bugs in converting ext4 to use the new mount API, as well as more bug fixes and clean ups in the ext4 fast_commit feature (most notably, in the tracepoints). In the jbd2 layer, the t_handle_lock spinlock has been removed, with the last place where it was actually needed replaced with an atomic cmpxchg" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (35 commits) ext4: fix kernel doc warnings ext4: fix remaining two trace events to use same printk convention ext4: add commit tid info in ext4_fc_commit_start/stop trace events ext4: add commit_tid info in jbd debug log ext4: add transaction tid info in fc_track events ext4: add new trace event in ext4_fc_cleanup ext4: return early for non-eligible fast_commit track events ext4: do not call FC trace event in ext4_fc_commit() if FS does not support FC ext4: convert ext4_fc_track_dentry type events to use event class ext4: fix ext4_fc_stats trace point ext4: remove unused enum EXT4_FC_COMMIT_FAILED ext4: warn when dirtying page w/o buffers in data=journal mode doc: fixed a typo in ext4 documentation ext4: make mb_optimize_scan performance mount option work with extents ext4: make mb_optimize_scan option work with set/unset mount cmd ext4: don't BUG if someone dirty pages without asking ext4 first ext4: remove redundant assignment to variable split_flag1 ext4: fix underflow in ext4_max_bitmap_size() ext4: fix ext4_mb_clear_bb() kernel-doc comment ext4: fix fs corruption when tring to remove a non-empty directory with IO error ...
2 parents 14705fd + 919adbf commit 9b03992

File tree

17 files changed

+696
-413
lines changed

17 files changed

+696
-413
lines changed

Documentation/filesystems/ext4/blocks.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For 32-bit filesystems, limits are as follows:
3939
- 4TiB
4040
- 8TiB
4141
- 16TiB
42-
- 256PiB
42+
- 256TiB
4343
* - Blocks Per Block Group
4444
- 8,192
4545
- 16,384

fs/ext4/balloc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ static int ext4_validate_block_bitmap(struct super_block *sb,
411411
* ext4_read_block_bitmap_nowait()
412412
* @sb: super block
413413
* @block_group: given block group
414+
* @ignore_locked: ignore locked buffers
414415
*
415416
* Read the bitmap for a given block_group,and validate the
416417
* bits for block/inode/inode tables are set in the bitmaps

fs/ext4/block_validity.c

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,10 @@ void ext4_release_system_zone(struct super_block *sb)
292292
call_rcu(&system_blks->rcu, ext4_destroy_system_zone);
293293
}
294294

295-
/*
296-
* Returns 1 if the passed-in block region (start_blk,
297-
* start_blk+count) is valid; 0 if some part of the block region
298-
* overlaps with some other filesystem metadata blocks.
299-
*/
300-
int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,
301-
unsigned int count)
295+
int ext4_sb_block_valid(struct super_block *sb, struct inode *inode,
296+
ext4_fsblk_t start_blk, unsigned int count)
302297
{
303-
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
298+
struct ext4_sb_info *sbi = EXT4_SB(sb);
304299
struct ext4_system_blocks *system_blks;
305300
struct ext4_system_zone *entry;
306301
struct rb_node *n;
@@ -329,7 +324,9 @@ int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,
329324
else if (start_blk >= (entry->start_blk + entry->count))
330325
n = n->rb_right;
331326
else {
332-
ret = (entry->ino == inode->i_ino);
327+
ret = 0;
328+
if (inode)
329+
ret = (entry->ino == inode->i_ino);
333330
break;
334331
}
335332
}
@@ -338,6 +335,17 @@ int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,
338335
return ret;
339336
}
340337

338+
/*
339+
* Returns 1 if the passed-in block region (start_blk,
340+
* start_blk+count) is valid; 0 if some part of the block region
341+
* overlaps with some other filesystem metadata blocks.
342+
*/
343+
int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,
344+
unsigned int count)
345+
{
346+
return ext4_sb_block_valid(inode->i_sb, inode, start_blk, count);
347+
}
348+
341349
int ext4_check_blockref(const char *function, unsigned int line,
342350
struct inode *inode, __le32 *p, unsigned int max)
343351
{

fs/ext4/ext4.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,8 @@ struct ext4_inode_info {
10461046

10471047
/* Fast commit related info */
10481048

1049+
/* For tracking dentry create updates */
1050+
struct list_head i_fc_dilist;
10491051
struct list_head i_fc_list; /*
10501052
* inodes that need fast commit
10511053
* protected by sbi->s_fc_lock.
@@ -1279,7 +1281,7 @@ struct ext4_inode_info {
12791281
#define ext4_find_next_zero_bit find_next_zero_bit_le
12801282
#define ext4_find_next_bit find_next_bit_le
12811283

1282-
extern void ext4_set_bits(void *bm, int cur, int len);
1284+
extern void mb_set_bits(void *bm, int cur, int len);
12831285

12841286
/*
12851287
* Maximal mount counts between two filesystem checks
@@ -3707,6 +3709,9 @@ extern int ext4_inode_block_valid(struct inode *inode,
37073709
unsigned int count);
37083710
extern int ext4_check_blockref(const char *, unsigned int,
37093711
struct inode *, __le32 *, unsigned int);
3712+
extern int ext4_sb_block_valid(struct super_block *sb, struct inode *inode,
3713+
ext4_fsblk_t start_blk, unsigned int count);
3714+
37103715

37113716
/* extents.c */
37123717
struct ext4_ext_path;

fs/ext4/extents.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3368,7 +3368,6 @@ static int ext4_split_extent(handle_t *handle,
33683368
return -EFSCORRUPTED;
33693369
}
33703370
unwritten = ext4_ext_is_unwritten(ex);
3371-
split_flag1 = 0;
33723371

33733372
if (map->m_lblk >= ee_block) {
33743373
split_flag1 = split_flag & EXT4_EXT_DATA_VALID2;

0 commit comments

Comments
 (0)