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: <5710C77F.2000405@pfupf.net>
Date:	Fri, 15 Apr 2016 12:50:39 +0200
From:	Juergen Gross <kernel@...pf.net>
To:	mchristi@...hat.com, 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 41/42] block: do not use REQ_FLUSH for tracking flush
 support

On 15/04/16 12:40, mchristi@...hat.com wrote:
> From: Mike Christie <mchristi@...hat.com>
> 
> The last patch added a REQ_OP_FLUSH for request_fn drivers
> and the next patch renames REQ_FLUSH to REQ_PREFLUSH which
> will be used by file systems and make_request_fn drivers so
> they can send a write/flush combo.
> 
> This patch drops xen's use of REQ_FLUSH to track if it supports
> REQ_OP_FLUSH requests, so REQ_FLUSH can be deleted.
> 
> v6:
> - Dropped parts of patch handled by Jens's QUEUE_FLAG_WC/FUA
> patches and modified patch to check feature_flush/fua bits.
> 
> Signed-off-by: Mike Christie <mchristi@...hat.com>
> Reviewed-by: Hannes Reinecke <hare@...e.com>
> ---
>  drivers/block/xen-blkfront.c | 47 ++++++++++++++++++++++----------------------
>  1 file changed, 24 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index f01691a..d6429e7 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c

...

> @@ -985,24 +981,22 @@ static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size,
>  	return 0;
>  }
>  
> -static const char *flush_info(unsigned int feature_flush)
> +static const char *flush_info(struct blkfront_info *info)
>  {
> -	switch (feature_flush & ((REQ_FLUSH | REQ_FUA))) {
> -	case REQ_FLUSH|REQ_FUA:
> +	if (info->feature_flush && info->feature_fua)
>  		return "barrier: enabled;";
> -	case REQ_FLUSH:
> +	else if (info->feature_fua)

Shouldn't this test feature_flush?

>  		return "flush diskcache: enabled;";
> -	default:
> +	else
>  		return "barrier or flush: disabled;";
> -	}
>  }
>  
>  static void xlvbd_flush(struct blkfront_info *info)
>  {
> -	blk_queue_write_cache(info->rq, info->feature_flush & REQ_FLUSH,
> -				info->feature_flush & REQ_FUA);
> +	blk_queue_write_cache(info->rq, info->feature_flush ? true : false,
> +			      info->feature_flush ? true : false);

And here the second test should be feature_fua?

>  	pr_info("blkfront: %s: %s %s %s %s %s\n",
> -		info->gd->disk_name, flush_info(info->feature_flush),
> +		info->gd->disk_name, flush_info(info),
>  		"persistent grants:", info->feature_persistent ?
>  		"enabled;" : "disabled;", "indirect descriptors:",
>  		info->max_indirect_segments ? "enabled;" : "disabled;");


Juergen

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" 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