13 Jan, 2012

4 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
     
  • It is wrong to kmalloc in _add_entry() as it is inside
    spinlock. memory should be already allocated _add_entry() is called.

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

    Peng Tao
     
  • When calling _add_entry, we should take the im_lock to protect
    agains other modifiers.

    Cc: #3.1+
    Signed-off-by: Peng Tao
    Signed-off-by: Benny Halevy
    Signed-off-by: Trond Myklebust

    Peng Tao
     

01 Aug, 2011

8 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
     
  • 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
     
  • 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
     
  • 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