Re: [PATCH 01/11] libceph: support prefix and suffix in bio_iter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/04/2018 10:28 PM, Ilya Dryomov wrote:
On Mon, Dec 3, 2018 at 1:51 PM Dongsheng Yang
<dongsheng.yang@xxxxxxxxxxxx> wrote:
When we want to add some prefix to the bio data, such as journal header,
we don't want to copy it from bio into a new larger memory. Instead, we need
a prefix page and suffix page to store the header and footer in bio_iter.

Signed-off-by: Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx>
...
  }
  #endif /* CONFIG_BLOCK */
Have you looked at message data items (ceph_msg_data) for this?
A message can have multiple data items, each of different type (BIO,
PAGES, etc) and with its own iterator.  The messenger will exhaust them
in order, so you can create a message with three data items: prefix
(type PAGES), data (type BIO), suffix (type PAGES).
Yes, that was my first idea, but I found the framework is not
enough to my case. And as I need to use bio only in my case,
so I chose the easy way to extend the special case for bio.

If the data item framework isn't flexible enough, we should work on
extending it.  Special casing the bio iterator is the wrong thing to
do.

Agreed, I will go back to the framework itself and find some way
to make it work in my case.

Thanx

Thanks,

                 Ilya






[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux