[lkml]   [2002]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] smbfs fsx'ed
    >>>>> " " == Urban Widmark <> writes:

    > The current code synchronizes all threads on the same mount
    > since all threads use "server->packet" as a buffer for send and
    > receive. I have some code where I have tried to copy how I
    > believe nfs does things with a "struct request" for each
    > caller.

    All NFS does is to wrap the pages to read/write with a struct
    'nfs_page' that allows us to string them together in a list. When
    somebody calls sync_page() or decides to flush out the pending writes,
    we collate these 'nfs_page' things into appropriately sized private
    lists (NFS has a server-provided upper limit on the number of bytes
    you can send) and generate an RPC call.
    In addition, there is code to limit the total number of pending
    nfs_page structs (in order to avoid trouble due to flooding memory
    with cached requests), and for managing request timeouts.

    See the files include/linux/nfs_page.h, and fs/nfs/pagelist.c for details.

    The struct nfs_page does contain one or 2 entries which are
    NFS-specific (the RPC credential and commit cookie), but if you ignore
    them, the rest of the machinery should be fairly easily adaptable for
    reuse in the SMB code. One would perhaps have to rip out the
    NFS_SERVER() stuff in pagelist.c (which is used to maintain a couple
    of mount-global lists), and replace it with a slightly more generic
    interface, but that's all trivial stuff.

    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: 2005-03-22 13:15    [W:0.021 / U:4.976 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site