lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2023 15:37:26 +0100
From: Jan Kara <jack@...e.cz>
To: Zhihao Cheng <chengzhihao1@...wei.com>
Cc: tytso@....edu, jack@...e.com, linux-ext4@...r.kernel.org,
	yi.zhang@...wei.com
Subject: Re: [PATCH 3/5] jbd2: Remove unused 'JBD2_CHECKPOINT_IO_ERROR' and
 'j_atomic_flags'

On Fri 03-11-23 22:52:48, Zhihao Cheng wrote:
> Since 'JBD2_CHECKPOINT_IO_ERROR' and j_atomic_flags' are not useful
> anymore after fs dev's errseq is imported into jbd2, just remove them.
> 
> Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>

Nice! Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/jbd2/checkpoint.c | 11 -----------
>  include/linux/jbd2.h | 11 -----------
>  2 files changed, 22 deletions(-)
> 
> diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c
> index 118699fff2f9..1c97e64c4784 100644
> --- a/fs/jbd2/checkpoint.c
> +++ b/fs/jbd2/checkpoint.c
> @@ -556,7 +556,6 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
>  	struct transaction_chp_stats_s *stats;
>  	transaction_t *transaction;
>  	journal_t *journal;
> -	struct buffer_head *bh = jh2bh(jh);
>  
>  	JBUFFER_TRACE(jh, "entry");
>  
> @@ -569,16 +568,6 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
>  
>  	JBUFFER_TRACE(jh, "removing from transaction");
>  
> -	/*
> -	 * If we have failed to write the buffer out to disk, the filesystem
> -	 * may become inconsistent. We cannot abort the journal here since
> -	 * we hold j_list_lock and we have to be careful about races with
> -	 * jbd2_journal_destroy(). So mark the writeback IO error in the
> -	 * journal here and we abort the journal later from a better context.
> -	 */
> -	if (buffer_write_io_error(bh))
> -		set_bit(JBD2_CHECKPOINT_IO_ERROR, &journal->j_atomic_flags);
> -
>  	__buffer_unlink(jh);
>  	jh->b_cp_transaction = NULL;
>  	percpu_counter_dec(&journal->j_checkpoint_jh_count);
> diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
> index 15798f88ade4..bdde776b90d9 100644
> --- a/include/linux/jbd2.h
> +++ b/include/linux/jbd2.h
> @@ -755,11 +755,6 @@ struct journal_s
>  	 */
>  	unsigned long		j_flags;
>  
> -	/**
> -	 * @j_atomic_flags: Atomic journaling state flags.
> -	 */
> -	unsigned long		j_atomic_flags;
> -
>  	/**
>  	 * @j_errno:
>  	 *
> @@ -1403,12 +1398,6 @@ JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit,	FAST_COMMIT)
>  #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
>   * management
> -- 
> 2.39.2
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ