On Mon, 22 Oct 2018 22:32:14 +0530, jitendra kumar khasdev said: > Working on a custom driver that tracks I/Os on block level. For some use > case, I need to write metadata of tracked I/Os from driver in shutdown > sequence (more likely in reboot handler). In reboot handler, performing I/O > on disk is tricky (no userspace, no VFS. no sysfs). Now take a step back. What problem are you trying to solve by scribbling on blocks? What's in the metadata that (a) needs to be preserved and (b) can't be done by feeding it to a userspace process? Hint: A number of dm targets need to track I/Os and manage to do so without writing to a file system. > Although, I am able to write one sector, by creating custom bio and giving > manually sector to disk. Still, looking some correct API like > *write_IO_on_disk(buffer, dev, offset, len)* That's just *looking* for an fsck. :)
Attachment:
pgpeMIIM16PG8.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies