13 Jan, 2012

2 commits

  • As discussed earlier, it is better for block client to allocate memory for
    tracking extents state before submitting bio. So the patch does it by allocating
    a short_extent for every INVALID extent touched by write pagelist and for
    every zeroing page we created, saving them in layout header. Then in end_io we
    can just use them to create commit list items and avoid memory allocation there.

    Signed-off-by: Peng Tao
    Signed-off-by: Benny Halevy
    Signed-off-by: Trond Myklebust

    Peng Tao
     
  • It does not need to manipulate on partial initialized blocks.
    Writeback code takes care of it.

    Signed-off-by: Peng Tao
    Signed-off-by: Benny Halevy
    Signed-off-by: Trond Myklebust

    Peng Tao
     

19 Oct, 2011

2 commits

  • The same function is used by idmap, gss and blocklayout code. Make it
    generic.

    Signed-off-by: Peng Tao
    Signed-off-by: Jim Rees
    Cc: stable@kernel.org [3.0]
    Signed-off-by: Trond Myklebust

    Peng Tao
     
  • Make the status field explicitly 32 bits. "...it's unlikely that the kernel
    and userspace would differ on the size of an int here, but it might be a
    good idea to go ahead and make that explicitly 32 bits in case we end up
    dealing with more exotic arches at some point in the future."

    Suggested-by: Jeff Layton
    Signed-off-by: Jim Rees
    Signed-off-by: Benny Halevy
    Cc: stable@kernel.org [3.0]
    Signed-off-by: Trond Myklebust

    Jim Rees
     

01 Aug, 2011

12 commits

  • Signed-off-by: Peng Tao
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • In blocklayout driver. There are two things happening
    while layoutcommit/cleanup.
    1. the modified extents are encoded.
    2. On cleanup the extents are put back on the layout rw
    extents list, for reads.

    In the new system where actual xdr encoding is done in
    encode_layoutcommit() directly into xdr buffer, these are
    the new commit stages:

    1. On setup_layoutcommit, the range is adjusted as before
    and a structure is allocated for communication with
    bl_encode_layoutcommit && bl_cleanup_layoutcommit
    (Generic layer provides a void-star to hang it on)

    2. bl_encode_layoutcommit is called to do the actual
    encoding directly into xdr. The commit-extent-list is not
    freed and is stored on above structure.
    FIXME: The code is not yet converted to the new XDR cleanup

    3. On cleanup the commit-extent-list is put back by a call
    to set_to_rw() as before, but with no need for XDR decoding
    of the list as before. And the commit-extent-list is freed.
    Finally allocated structure is freed.

    [rm inode and pnfs_layout_hdr args from cleanup_layoutcommit()]
    Signed-off-by: Jim Rees
    [pnfsblock: introduce bl_committing list]
    Signed-off-by: Peng Tao
    [pnfsblock: SQUASHME: adjust to API change]
    Signed-off-by: Fred Isaman
    [blocklayout: encode_layoutcommit implementation]
    Signed-off-by: Boaz Harrosh
    [pnfsblock: fix bug setting up layoutcommit.]
    Signed-off-by: Tao Guo
    [pnfsblock: cleanup_layoutcommit wants a status parameter]
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • In blocklayout driver. There are two things happening
    while layoutcommit/cleanup.
    1. the modified extents are encoded.
    2. On cleanup the extents are put back on the layout rw
    extents list, for reads.

    In the new system where actual xdr encoding is done in
    encode_layoutcommit() directly into xdr buffer, these are
    the new commit stages:

    1. On setup_layoutcommit, the range is adjusted as before
    and a structure is allocated for communication with
    bl_encode_layoutcommit && bl_cleanup_layoutcommit
    (Generic layer provides a void-star to hang it on)

    2. bl_encode_layoutcommit is called to do the actual
    encoding directly into xdr. The commit-extent-list is not
    freed and is stored on above structure.
    FIXME: The code is not yet converted to the new XDR cleanup

    3. On cleanup the commit-extent-list is put back by a call
    to set_to_rw() as before, but with no need for XDR decoding
    of the list as before. And the commit-extent-list is freed.
    Finally allocated structure is freed.

    [rm inode and pnfs_layout_hdr args from cleanup_layoutcommit()]
    [pnfsblock: get rid of deprecated xdr macros]
    Signed-off-by: Jim Rees
    Signed-off-by: Peng Tao
    Signed-off-by: Fred Isaman
    [blocklayout: encode_layoutcommit implementation]
    Signed-off-by: Boaz Harrosh
    [pnfsblock: fix bug setting up layoutcommit.]
    Signed-off-by: Tao Guo
    [pnfsblock: prevent commit list corruption]
    [pnfsblock: fix layoutcommit with an empty opaque]
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Adds working implementations of various support functions
    to handle INVAL extents, needed by writes, such as
    bl_mark_sectors_init and bl_is_sector_init.

    [pnfsblock: fix 64-bit compiler warnings for extent manipulation]
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [Implement release_inval_marks]
    Signed-off-by: Zhang Jingwang
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Implement bl_find_get_extent(), one of the core extent manipulation
    routines.

    [pnfsblock: Lookup list entry of layouts and tags in reverse order]
    Signed-off-by: Zhang Jingwang
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees

    pnfsblock: fix print format warnings for sector_t and size_t

    gcc spews warnings about these on x86_64, e.g.:
    fs/nfs/blocklayout/blocklayout.c:74: warning: format ‘%Lu’ expects type ‘long long unsigned int’, but argument 2 has type ‘sector_t’
    fs/nfs/blocklayout/blocklayout.c:388: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘size_t’

    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Call GETDEVICELIST during mount, then call and parse GETDEVICEINFO
    for each device returned.

    [pnfsblock: get rid of deprecated xdr macros]
    Signed-off-by: Jim Rees
    [pnfsblock: fix pnfs_deviceid references]
    Signed-off-by: Fred Isaman
    [pnfsblock: fix print format warnings for sector_t and size_t]
    [pnfs-block: #include ]
    [pnfsblock: no PNFS_NFS_SERVER]
    Signed-off-by: Benny Halevy
    [pnfsblock: fix bug determining size of striped volume]
    [pnfsblock: fix oops when using multiple devices]
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [pnfsblock: get rid of vmap and deviceid->area structure]
    Signed-off-by: Peng Tao
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Replace a stub, so that extents underlying the layouts are properly
    added, merged, or ignored as necessary.

    Signed-off-by: Fred Isaman
    [pnfsblock: delete the new node before put it]
    Signed-off-by: Mingyang Guo
    Signed-off-by: Benny Halevy
    Signed-off-by: Peng Tao
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Signed-off-by: Fred Isaman
    [pnfsblock: fix bug getting pnfs_layout_type in translate_devid().]
    Signed-off-by: Tao Guo
    Signed-off-by: Benny Halevy
    Signed-off-by: Zhang Jingwang
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Signed-off-by: Jim Rees
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [upcall bugfixes]
    Signed-off-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Jim Rees
     
  • Signed-off-by: Jim Rees
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [upcall bugfixes]
    Signed-off-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Jim Rees
     
  • Adds structures and basic create/delete code for extents.

    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Zhang Jingwang
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Define a configuration variable to enable/disable compilation of the
    block driver code.

    Add the minimal structure for a pnfs block layout driver, and empty
    list-heads that will hold the extent data

    [pnfsblock: make NFS_V4_1 select PNFS_BLOCK]
    Signed-off-by: Peng Tao
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    [pnfs-block: fix CONFIG_PNFS_BLOCK dependencies]
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [pnfsblock: SQUASHME: adjust to API change]
    Signed-off-by: Fred Isaman
    [pnfs: move pnfs_layout_type inline in nfs_inode]
    Signed-off-by: Benny Halevy
    [blocklayout: encode_layoutcommit implementation]
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [pnfsblock: layout alloc and free]
    Signed-off-by: Fred Isaman
    [pnfs: move pnfs_layout_type inline in nfs_inode]
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    [pnfsblock: define module alias]
    Signed-off-by: Peng Tao
    [rm inode and pnfs_layout_hdr args from cleanup_layoutcommit()]
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Fred Isaman