In addition to bug fixes and cleanups, there are two new features for
ext4 in 5.14:
- Allow applications to poll on changes to /sys/fs/ext4/*/errors_count
- Add the ioctl EXT4_IOC_CHECKPOINT which allows the journal to be
checkpointed, truncated and discarded or zero'ed.
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAmDcjRgACgkQ8vlZVpUN
gaMAMQgAjRYUQ+tdJVZzInFwukudhgLyuCP9AdCx76fisaH22yNCakQ7M2XGz59i
/YbJerLaueYpHZzpA9p5+sSjVhMwILO3scBSJbOwdsbrFAsFLzcgQKQhGGqK2KvX
IAOEArC8/hm1wnVb7sfQYdBHlWyeJpI8hd/8WZPlYtySlRnP1TZCd+X7y7lmNs1H
QU1KECwstI2t8Lug0QeKx2B9PI9AWcCs0lTJ4LfcANZAh3HIJi9aUCk4SFDRkf3/
8AazvMqTHJD9yc+BNyZOro2ykDFCStkNqf0cDYTzvKrr66CHScPUtyI0oAEdspxN
+SNNARPGZgNOuR3ZRbGivtwgEB+GpQ==
=jSd4
-----END PGP SIGNATURE-----
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o:
"In addition to bug fixes and cleanups, there are two new features for
ext4 in 5.14:
- Allow applications to poll on changes to
/sys/fs/ext4/*/errors_count
- Add the ioctl EXT4_IOC_CHECKPOINT which allows the journal to be
checkpointed, truncated and discarded or zero'ed"
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (32 commits)
jbd2: export jbd2_journal_[un]register_shrinker()
ext4: notify sysfs on errors_count value change
fs: remove bdev_try_to_free_page callback
ext4: remove bdev_try_to_free_page() callback
jbd2: simplify journal_clean_one_cp_list()
jbd2,ext4: add a shrinker to release checkpointed buffers
jbd2: remove redundant buffer io error checks
jbd2: don't abort the journal when freeing buffers
jbd2: ensure abort the journal if detect IO error when writing original buffer back
jbd2: remove the out label in __jbd2_journal_remove_checkpoint()
ext4: no need to verify new add extent block
jbd2: clean up misleading comments for jbd2_fc_release_bufs
ext4: add check to prevent attempting to resize an fs with sparse_super2
ext4: consolidate checks for resize of bigalloc into ext4_resize_begin
ext4: remove duplicate definition of ext4_xattr_ibody_inline_set()
ext4: fsmap: fix the block/inode bitmap comment
ext4: fix comment for s_hash_unsigned
ext4: use local variable ei instead of EXT4_I() macro
ext4: fix avefreec in find_group_orlov
ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit
...
This commit is contained in:
commit
a6ecc2a491
25 changed files with 720 additions and 215 deletions
|
|
@ -2171,7 +2171,6 @@ struct super_operations {
|
|||
ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
|
||||
struct dquot **(*get_dquots)(struct inode *);
|
||||
#endif
|
||||
int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
|
||||
long (*nr_cached_objects)(struct super_block *,
|
||||
struct shrink_control *);
|
||||
long (*free_cached_objects)(struct super_block *,
|
||||
|
|
|
|||
|
|
@ -779,6 +779,11 @@ struct journal_s
|
|||
*/
|
||||
unsigned long j_flags;
|
||||
|
||||
/**
|
||||
* @j_atomic_flags: Atomic journaling state flags.
|
||||
*/
|
||||
unsigned long j_atomic_flags;
|
||||
|
||||
/**
|
||||
* @j_errno:
|
||||
*
|
||||
|
|
@ -904,6 +909,29 @@ struct journal_s
|
|||
*/
|
||||
struct buffer_head *j_chkpt_bhs[JBD2_NR_BATCH];
|
||||
|
||||
/**
|
||||
* @j_shrinker:
|
||||
*
|
||||
* Journal head shrinker, reclaim buffer's journal head which
|
||||
* has been written back.
|
||||
*/
|
||||
struct shrinker j_shrinker;
|
||||
|
||||
/**
|
||||
* @j_jh_shrink_count:
|
||||
*
|
||||
* Number of journal buffers on the checkpoint list. [j_list_lock]
|
||||
*/
|
||||
struct percpu_counter j_jh_shrink_count;
|
||||
|
||||
/**
|
||||
* @j_shrink_transaction:
|
||||
*
|
||||
* Record next transaction will shrink on the checkpoint list.
|
||||
* [j_list_lock]
|
||||
*/
|
||||
transaction_t *j_shrink_transaction;
|
||||
|
||||
/**
|
||||
* @j_head:
|
||||
*
|
||||
|
|
@ -1370,6 +1398,16 @@ JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit, FAST_COMMIT)
|
|||
* mode */
|
||||
#define JBD2_FAST_COMMIT_ONGOING 0x100 /* Fast commit is ongoing */
|
||||
#define JBD2_FULL_COMMIT_ONGOING 0x200 /* Full commit is ongoing */
|
||||
#define JBD2_JOURNAL_FLUSH_DISCARD 0x0001
|
||||
#define JBD2_JOURNAL_FLUSH_ZEROOUT 0x0002
|
||||
#define JBD2_JOURNAL_FLUSH_VALID (JBD2_JOURNAL_FLUSH_DISCARD | \
|
||||
JBD2_JOURNAL_FLUSH_ZEROOUT)
|
||||
|
||||
/*
|
||||
* Journal atomic flag definitions
|
||||
*/
|
||||
#define JBD2_CHECKPOINT_IO_ERROR 0x001 /* Detect io error while writing
|
||||
* buffer back to disk */
|
||||
|
||||
/*
|
||||
* Function declarations for the journaling transaction and buffer
|
||||
|
|
@ -1407,6 +1445,7 @@ extern void jbd2_journal_commit_transaction(journal_t *);
|
|||
|
||||
/* Checkpoint list management */
|
||||
void __jbd2_journal_clean_checkpoint_list(journal_t *journal, bool destroy);
|
||||
unsigned long jbd2_journal_shrink_checkpoint_list(journal_t *journal, unsigned long *nr_to_scan);
|
||||
int __jbd2_journal_remove_checkpoint(struct journal_head *);
|
||||
void jbd2_journal_destroy_checkpoint(journal_t *journal);
|
||||
void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *);
|
||||
|
|
@ -1500,7 +1539,7 @@ extern int jbd2_journal_invalidatepage(journal_t *,
|
|||
struct page *, unsigned int, unsigned int);
|
||||
extern int jbd2_journal_try_to_free_buffers(journal_t *journal, struct page *page);
|
||||
extern int jbd2_journal_stop(handle_t *);
|
||||
extern int jbd2_journal_flush (journal_t *);
|
||||
extern int jbd2_journal_flush(journal_t *journal, unsigned int flags);
|
||||
extern void jbd2_journal_lock_updates (journal_t *);
|
||||
extern void jbd2_journal_unlock_updates (journal_t *);
|
||||
|
||||
|
|
@ -1517,6 +1556,8 @@ extern int jbd2_journal_set_features
|
|||
(journal_t *, unsigned long, unsigned long, unsigned long);
|
||||
extern void jbd2_journal_clear_features
|
||||
(journal_t *, unsigned long, unsigned long, unsigned long);
|
||||
extern int jbd2_journal_register_shrinker(journal_t *journal);
|
||||
extern void jbd2_journal_unregister_shrinker(journal_t *journal);
|
||||
extern int jbd2_journal_load (journal_t *journal);
|
||||
extern int jbd2_journal_destroy (journal_t *);
|
||||
extern int jbd2_journal_recover (journal_t *journal);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue