From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muthu Kumar Subject: Re: [dm-devel] [PATCH v5 12/12] block: Only clone bio vecs that are in use Date: Thu, 9 Aug 2012 19:29:04 -0700 Message-ID: References: <1344290921-25154-1-git-send-email-koverstreet@google.com> <1344290921-25154-13-git-send-email-koverstreet@google.com> <20120808232804.GL6983@dhcp-172-17-108-109.mtv.corp.google.com> <20120809070154.GG2845@dhcp-172-17-108-109.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <20120809070154.GG2845-RcKxWJ4Cfj1J2suj2OqeGauc2jM2gXBXkQQo+JxHRPFibQn6LdNjmg@public.gmane.org> Sender: linux-bcache-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tejun Heo Cc: Mikulas Patocka , device-mapper development , linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, Kent Overstreet , vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, yehuda-L5o5AL9CYN0tUFlbccrkMA@public.gmane.org, sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org, agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org List-Id: linux-bcache@vger.kernel.org Tejun, On Thu, Aug 9, 2012 at 12:01 AM, Tejun Heo wrote: > Hello, > > On Wed, Aug 08, 2012 at 04:47:46PM -0700, Muthu Kumar wrote: >> You are changing the meaning of __bio_clone() here. In old code, the >> number of io_vecs, bi_idx, bi_vcnt are preserved. But in this modified >> code, you are mapping bio_src's bi_iovec[bi_idx] to bio_dests >> bi_iovec[0] and also restricting the number of allocated io_vecs of >> the clone. It may be useful for cases were we would like a identical >> copy of the original bio (may not be in current code base, but this >> implementation is definitely not what one would expect from the name >> "clone"). > > Implementation details changed somewhat but the high-level semantics > didn't change at all. Any driver not messing with bio internals - and > they shouldn't - shouldn't notice the change. The reason for doing this change is because the code in question is messing with bio internals. No in-kernel drivers > seem to be broken by the change. If you ask me, this looks more like > a bug fix to me where the bug is a silly behavior restricting > usefulness of the interface. > >> May be, call this new implementation some thing else (and use it for bcache)? > > This doesn't only change __bio_clone() but all clone interface stacked > on top of it, so, no way. >This ain't windows. ah... when you put it this way, it gets a different perspective :) Anyway, my point is, we shouldn't make it non-obvious ("clone" should be just "clone"). But, we can always add more comments i guess. Regards, Muthu > > Thanks. > > -- > tejun