All of lore.kernel.org
 help / color / mirror / Atom feed
* Any bio_clone_slow() implementation which doesn't share bi_io_vec?
@ 2021-11-23  6:44 ` Qu Wenruo
  0 siblings, 0 replies; 30+ messages in thread
From: Qu Wenruo @ 2021-11-23  6:44 UTC (permalink / raw)
  To: Linux FS Devel, dm-devel; +Cc: linux-btrfs

Hi,

Although there are some out-of-date comments mentions other
bio_clone_*() variants, but there isn't really any other bio clone
variants other than __bio_clone_fast(), which shares bi_io_vec with the
source bio.

This limits means we can't free the source bio before the cloned one.

Is there any bio_clone variant which do a deep clone, including bi_io_vec?



The background story is a little long, with btrfs involved.

Unlike dm/md-raid which uses bio_split(), btrfs splits its bio before
even creating a bio.
Every time btrfs wants to create a bio, it will calculate the boundary,
thus will only create a bio which never cross various raid boundary.

But this is not really the common practice, I'd like to at least change
the timing of bio split so that reflects more like dm/md raid.

That's why the bio_clone thing is involved, there is still some corner
cases that we don't want to fail the whole large bio if there is only
one stripe failed (mostly for read bio, that we want to salvage as much
data as possible)

Thus regular bio_split() + bio_chain() solution is not that good here.

Any idea why no such bio_clone_slow() or bio_split_slow() provided in
block layer?

Or really bio_split() + bio_chain() is the only recommended solution?

Thanks,
Qu

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2021-11-26 12:35 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23  6:44 Any bio_clone_slow() implementation which doesn't share bi_io_vec? Qu Wenruo
2021-11-23  6:44 ` [dm-devel] " Qu Wenruo
2021-11-23  7:43 ` Christoph Hellwig
2021-11-23  7:43   ` [dm-devel] " Christoph Hellwig
2021-11-23  8:10   ` Qu Wenruo
2021-11-23  8:10     ` [dm-devel] " Qu Wenruo
2021-11-23  8:13     ` Christoph Hellwig
2021-11-23  8:13       ` [dm-devel] " Christoph Hellwig
2021-11-23 11:09       ` Qu Wenruo
2021-11-23 11:09         ` [dm-devel] " Qu Wenruo
2021-11-23 11:39         ` Johannes Thumshirn
2021-11-23 11:39           ` [dm-devel] " Johannes Thumshirn
2021-11-23 14:28           ` hch
2021-11-23 14:28             ` [dm-devel] " hch
2021-11-23 23:07             ` Qu Wenruo
2021-11-23 23:07               ` [dm-devel] " Qu Wenruo
2021-11-24  6:09               ` hch
2021-11-24  6:09                 ` [dm-devel] " hch
2021-11-24  6:18                 ` Qu Wenruo
2021-11-24  6:18                   ` [dm-devel] " Qu Wenruo
2021-11-24  7:02                   ` hch
2021-11-24  7:02                     ` [dm-devel] " hch
2021-11-24  7:22                     ` hch
2021-11-24  7:22                       ` [dm-devel] " hch
2021-11-24  7:25               ` Naohiro Aota
2021-11-24  7:25                 ` [dm-devel] " Naohiro Aota
2021-11-24  7:39                 ` Qu Wenruo
2021-11-24  7:39                   ` [dm-devel] " Qu Wenruo
2021-11-26 12:33       ` Qu Wenruo
2021-11-26 12:33         ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.