lkml.org 
[lkml]   [2007]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 1/3] fs: add an iovec iterator
Date
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-09 18:31    [W:1.803 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site