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
| ||
|
Date: Wed, 15 Jan 2014 20:39:42 -0500 From: "Martin K. Petersen" <martin.petersen@...cle.com> To: Kent Overstreet <kmo@...erainc.com> Cc: "Martin K. Petersen" <martin.petersen@...cle.com>, Hugh Dickins <hughd@...gle.com>, Jens Axboe <axboe@...nel.dk>, Shaohua Li <shli@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org Subject: Re: next bio iters break discard? >>>>> "Kent" == Kent Overstreet <kmo@...erainc.com> writes: Kent> Side note, one of the things on my todo list/wishlist is make a Kent> separate enum for bio type - bare flush, normal read/write, scsi Kent> command, discard and write same. In particular with bi_size Kent> meaning different things depending on the type of the command, I Kent> think having an enum we can switch off of where appropriate Kent> instead of a bunch of random flags will make things a hell of a Kent> lot saner. Yeah. That's one of the reasons we cleaned up the merge flags and introduced bio_has_data() and bio_is_rw(). Kent> There's also that horrible hack in the scsi (?) code Christoph Kent> added for discards - where the driver adds a page to the bio - if Kent> the driver is counting the number of segments _after_ that god Kent> only knows what is supposed to happen. I manually do the bookkeeping in the SCSI disk driver. I.e. LLDs are explicitly told to perform a 512-byte transfer. And when they're done I complete bi_size bytes to the block layer. Kind of ugly but it's an unfortunate side effect of bi_size being both the size of the scatterlist and the block count. I did consider making them separate entities but that means struct bio will grow for no reason for the common case of read/write. Didn't seem worth the hassle... Kent> Does the below patch look like what we want? I'm assuming that if Kent> multiple WRITE_SAME bios are merged, since they're all writing the Kent> same data we can consider the entire request to be a single Kent> segment. Looks OK to me. Acked-by: Martin K. Petersen <martin.petersen@...cle.com> -- Martin K. Petersen Oracle Linux Engineering -- 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