[lkml]   [2007]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] remove redundant iov segment check
    > I wonder if it wouldn't be better to make this change as part of a  
    > larger change that moves towards an explicit iovec container struct
    > rather than bare 'struct iov *' and 'nr_segs' arguments. The struct
    > could have a flag that expressed whether the elements had been
    > checked. A helper could be called by the upper and lower code paths
    > which does the checking, marks the flag, and avoids checking again if
    > the flag is set.
    > We've wanted an explicit struct in the past to avoid the multiple
    > walks of iovecs that various paths do for their own reasons. The
    > iovec walk that is checking for length wrapping could also be
    > building a bitmap of length alignment that O_DIRECT could be using to
    > test 512B alignment without having to walk the iovec again.

    I suspect it should be rather trivial to get this started. As a first
    step we simply add a

    struct iodesc {
    int nr_segs;
    struct iovec ioc[]

    And then we can add fields where nessecary. First a full_length one
    to avoid the loops to calculate thw whole I/O size, then flags for
    the alignment check, etc..
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-01-02 12:05    [W:0.024 / U:53.648 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site