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: <CANejiEX26=jqijgTwb0iLMw7WC7byF1o+whwp3K5CcY5_a8o8w@mail.gmail.com>
Date:	Thu, 22 Mar 2012 10:39:19 +0800
From:	Shaohua Li <shli@...nel.org>
To:	"Martin K. Petersen" <martin.petersen@...cle.com>
Cc:	Vivek Goyal <vgoyal@...hat.com>, axboe@...nel.dk,
	linux-kernel@...r.kernel.org, neilb@...e.de
Subject: Re: [patch 1/2]block: handle merged discard request

2012/3/22 Martin K. Petersen <martin.petersen@...cle.com>:
>>>>>> "Shaohua" == Shaohua Li <shli@...nel.org> writes:
>
> Shaohua> The SCSI discard implementation hacks the first bio of request
> Shaohua> to add payload, which makes blk_update_request() can't
> Shaohua> correctly mark bios finish.  The patch solves it. We set
> Shaohua> discard bio size to 0 and finish it after the hacked payload
> Shaohua> finishes.
>
> Ick!
>
> Also, you can't muck with bi_size because if we get an I/O error and
> have to reissue the command we no longer know how much to write.
> I have had to deal with the same issue for WRITE SAME. And the only sane
> approach is to distinguish between the DMA transfer size and the blocks
> "affected" by the command. That's what I'm working on right now for copy
> offload...
Yes, this is a problem. But note we already have this problem with
discard request for a long time. The payload has just (sector, length).
And looks the request finish returns the transfered data of the
payload instead of the discarded data. Am I missing anything?

> If this is something you want in 3.4 I guess we could temporarily add a
> separate length field to struct request. If you can wait I suggest we
> talk at LSF.
This blocked my raid discard patches, but I can wait. Sure we can have
a talk at LSF.

Thanks,
Shaohua
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ