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: <92d61426-65a2-827c-936b-55f12f3d6afb@grimberg.me>
Date:   Fri, 6 Sep 2019 17:00:18 -0700
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Logan Gunthorpe <logang@...tatee.com>,
        linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
        linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc:     Christoph Hellwig <hch@....de>, Keith Busch <kbusch@...nel.org>,
        Jens Axboe <axboe@...com>,
        Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
        Max Gurtovoy <maxg@...lanox.com>,
        Stephen Bates <sbates@...thlin.com>
Subject: Re: [PATCH v8 13/13] nvmet-passthru: support block accounting


> Support block disk accounting by setting the RQF_IO_STAT flag
> and gendisk in the request.
> 
> After this change, IO counts will be reflected correctly in
> /proc/diskstats for drives being used by passthru.
> 
> Signed-off-by: Logan Gunthorpe <logang@...tatee.com>
> ---
>   drivers/nvme/target/io-cmd-passthru.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/io-cmd-passthru.c b/drivers/nvme/target/io-cmd-passthru.c
> index 7557927a3451..63f12750a80d 100644
> --- a/drivers/nvme/target/io-cmd-passthru.c
> +++ b/drivers/nvme/target/io-cmd-passthru.c
> @@ -410,6 +410,9 @@ static struct request *nvmet_passthru_blk_make_request(struct nvmet_req *req,
>   	if (unlikely(IS_ERR(rq)))
>   		return rq;
>   
> +	if (blk_queue_io_stat(q) && cmd->common.opcode != nvme_cmd_flush)
> +		rq->rq_flags |= RQF_IO_STAT;

Does flush has data bytes in the request? Why the special casing?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ