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]
Message-Id: <20160419.010415.105960685033839882.konishi.ryusuke@lab.ntt.co.jp>
Date:	Tue, 19 Apr 2016 01:04:15 +0900 (JST)
From:	Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>
To:	Mike Christie <mchristi@...hat.com>
Cc:	linux-f2fs-devel@...ts.sourceforge.net, linux-ext4@...r.kernel.org,
	konrad.wilk@...cle.com, drbd-dev@...ts.linbit.com,
	philipp.reisner@...bit.com, lars.ellenberg@...bit.com,
	linux-raid@...r.kernel.org, dm-devel@...hat.com,
	linux-fsdevel@...r.kernel.org, linux-bcache@...r.kernel.org,
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org, linux-mtd@...ts.infradead.org,
	target-devel@...r.kernel.org, linux-btrfs@...r.kernel.org,
	osd-dev@...n-osd.org, xfs@....sgi.com, ocfs2-devel@....oracle.com
Subject: Re: [PATCH 16/42] nilfs: set bi_op to REQ_OP

On Fri, 15 Apr 2016 14:15:51 -0500, mchristi@...hat.com wrote:
> From: Mike Christie <mchristi@...hat.com>
> 
> This patch has nilfs use bio->bi_op for REQ_OPs and rq_flag_bits
> to bio->bi_rw.
> 
> Signed-off-by: Mike Christie <mchristi@...hat.com>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Reviewed-by: Hannes Reinecke <hare@...e.com>
> ---
>  fs/nilfs2/segbuf.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Looks good to me.

Acked-by: Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>

Thanks,
Ryuske Konishi

> 
> diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
> index 7666f1d..7b13e14 100644
> --- a/fs/nilfs2/segbuf.c
> +++ b/fs/nilfs2/segbuf.c
> @@ -350,7 +350,8 @@ static void nilfs_end_bio_write(struct bio *bio)
>  }
>  
>  static int nilfs_segbuf_submit_bio(struct nilfs_segment_buffer *segbuf,
> -				   struct nilfs_write_info *wi, int mode)
> +				   struct nilfs_write_info *wi, int mode,
> +				   int mode_flags)
>  {
>  	struct bio *bio = wi->bio;
>  	int err;
> @@ -368,7 +369,8 @@ static int nilfs_segbuf_submit_bio(struct nilfs_segment_buffer *segbuf,
>  
>  	bio->bi_end_io = nilfs_end_bio_write;
>  	bio->bi_private = segbuf;
> -	bio->bi_rw = mode;
> +	bio->bi_op = mode;
> +	bio->bi_rw = mode_flags;
>  	submit_bio(bio);
>  	segbuf->sb_nbio++;
>  
> @@ -442,7 +444,7 @@ static int nilfs_segbuf_submit_bh(struct nilfs_segment_buffer *segbuf,
>  		return 0;
>  	}
>  	/* bio is FULL */
> -	err = nilfs_segbuf_submit_bio(segbuf, wi, mode);
> +	err = nilfs_segbuf_submit_bio(segbuf, wi, mode, 0);
>  	/* never submit current bh */
>  	if (likely(!err))
>  		goto repeat;
> @@ -466,19 +468,19 @@ static int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf,
>  {
>  	struct nilfs_write_info wi;
>  	struct buffer_head *bh;
> -	int res = 0, rw = WRITE;
> +	int res = 0;
>  
>  	wi.nilfs = nilfs;
>  	nilfs_segbuf_prepare_write(segbuf, &wi);
>  
>  	list_for_each_entry(bh, &segbuf->sb_segsum_buffers, b_assoc_buffers) {
> -		res = nilfs_segbuf_submit_bh(segbuf, &wi, bh, rw);
> +		res = nilfs_segbuf_submit_bh(segbuf, &wi, bh, REQ_OP_WRITE);
>  		if (unlikely(res))
>  			goto failed_bio;
>  	}
>  
>  	list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) {
> -		res = nilfs_segbuf_submit_bh(segbuf, &wi, bh, rw);
> +		res = nilfs_segbuf_submit_bh(segbuf, &wi, bh, REQ_OP_WRITE);
>  		if (unlikely(res))
>  			goto failed_bio;
>  	}
> @@ -488,8 +490,8 @@ static int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf,
>  		 * Last BIO is always sent through the following
>  		 * submission.
>  		 */
> -		rw |= REQ_SYNC;
> -		res = nilfs_segbuf_submit_bio(segbuf, &wi, rw);
> +		res = nilfs_segbuf_submit_bio(segbuf, &wi, REQ_OP_WRITE,
> +					      REQ_SYNC);
>  	}
>  
>   failed_bio:
> -- 
> 2.7.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ