Modify a file content from block layer
valdis.kletnieks at vt.edu
valdis.kletnieks at vt.edu
Mon Oct 22 14:07:54 EDT 2018
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. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20181022/19a00d3b/attachment.sig>
More information about the Kernelnewbies
mailing list