What I have there is not actually a full-blown file io descriptor,
because
there is no file or offset. It is just an iovec iterator (so maybe
I should
rename it to iov_iter, rather than iodesc).
I think it might be a nice idea to keep this iov_iter as a standalone
structure, and it could be embedded into a struct file_io?
Yeah, maybe.
I'm not sure we need something as generic as a "file_io" struct.
To recap, I've hoped for the expression of the state of an iovec
array with a richer structure to avoid the multiple walks of the
array at different parts of the kernel that previously only had
access to the raw iovec * and size_t count.
Stuff like the alignment checks in __blockdev_direct_IO() and the
pages_in_io accounting in direct_io_worker().
I imagined building up the state in this 'iodesc' structure as we
first copied and verified the structure from userspace. (say in
rw_copy_check_uvector()).
If as we copied we, say, stored in the bits of the buffer and length
fields then by the time we got to __blockdev_direct_IO() we'd just
test the bits for misalignment instead of iterating over the array
again.
It starts to get gross as some paths currently modify the kernel copy
of the array as they process it :/.
- z
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]