Re: ceph kernel client orientation

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

 



Thanks for swift answer.

(This is my usage in librbd.cc)

Basically there is a folder with symmetric keys used for block encryption, one key for one disk in some pool. For identification of key I need (pool_id, disk_id) of block. I am temporarily saving key to librbd::ImageCtx structure, so I don't have to get it from file every time. I use this key to encrypt/decrypt block data. Encrypt/decrypt is primitive, I'm not gonna mention it here, but it is done over the data provided by functions rbd_read() and rbd_write().

If you could point how to edit rbd.c content to achieve similar behaviour, I would be much obliged.

M.



---------- Původní e-mail ----------

Od: Ilya Dryomov <idryomov@xxxxxxxxx>

Komu: Michal.Plsek@xxxxxxxxx

Datum: 19. 5. 2020 16:36:05

Předmět: Re: ceph kernel client orientation

On Tue, May 19, 2020 at 3:44 PM <Michal.Plsek@xxxxxxxxx> wrote:

>

> Hello,

>

> I am trying to get to functions responsible for reading/writing to/opening RBD blocks in ceph client kernel module (alternatives to librbd’s rbd_read(), rbd_write() etc.). I presume it should be located somewhere around drivers/block/, but until now I’ve been without luck. My idea is to edit these functions, rebuild the ceph kernel ‘rbd’ module and replace it. Since comments are pretty much missing everywhere, it would be nice to narrow my searching area.

>

> If you know anything about it, please let me know. Thanks, M.



Hi Michal,



Everything is in drivers/block/rbd.c.  The entry point is

rbd_queue_rq(), this is where all rbd requests are dispatched from.

After setting up where data is to be written from (for writes) or read

to (for reads), the details specific to each type of request (read,

write, discard or zeroout) are handled in __rbd_img_fill_request()

and then later on the respective state machine is kicked off.



The job of the state machine is to submit requests to the OSDs and

handle replies from the OSDs.  As in librbd, satisfying a single

user I/O request can require sending multiple OSDs requests, in some

cases sequentially.



Unfortunately, there is no one function to edit.  I might be able

to help more if you explain what you are trying to achieve.



Thanks,



                Ilya





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

  Powered by Linux