06 Jan, 2012

1 commit

  • Some time along the way pNFS IO errors were switched to
    communicate with a special iodata->pnfs_error member instead
    of the regular RPC members. But objlayout was not switched
    over.

    Fix that!
    Without this fix any IO error is hanged, because IO is not
    switched to MDS and pages are never cleared or read.

    [Applies to 3.2.0. Same bug different patch for 3.1/0 Kernels]
    CC: Stable Tree
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Trond Myklebust

    Boaz Harrosh
     

03 Nov, 2011

4 commits

  • * All instances of objlayout_io_state => objlayout_io_res
    * All instances of state => oir;
    * All instances of ol_state => oir;

    Big but nothing to it

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Trond Myklebust

    Boaz Harrosh
     
  • This is part of moving objio_osd to use the ORE.

    objlayout_io_state had two functions:
    1. It was used in the error reporting mechanism at layout_return.
    This function is kept intact.
    (Later patch will rename objlayout_io_state => objlayout_io_res)
    2. Carrier of rw io members into the objio_read/write_paglist API.
    This is removed in this patch.

    The {r,w}data received from NFS are passed directly to the
    objio_{read,write}_paglist API. The io_engine is now allocating
    it's own IO state as part of the read/write. The minimal
    functionality that was part of the generic allocation is passed
    to the io_engine.

    So part of this patch is rename of:
    ios->ol_state.foo => ios->foo

    At objlayout_{read,write}_done an objlayout_io_state is passed that
    denotes the result of the IO. (Hence the later name change).
    If the IO is successful objlayout calls an objio_free_result() API
    immediately (Which for objio_osd causes the release of the io_state).
    If the IO ended in an error it is hanged onto until reported in
    layout_return and is released later through the objio_free_result()
    API. (All this is not new just renamed and cleaned)

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Trond Myklebust

    Boaz Harrosh
     
  • objlayout driver was always returning PNFS_ATTEMPTED from it's
    read/write_pagelist operations. Even on error. Fix that.

    Start by establishing an error return API from io-engine, by
    not returning ssize_t (length-or-error) but returning "int"
    0=OK, 0>Error. And clean up all return types in io-engine.

    Then if io-engine returned error return PNFS_NOT_ATTEMPTED
    to generic layer. (With a dprint)

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Trond Myklebust

    Boaz Harrosh
     
  • The EOF calculation was done on .read_pagelist(), cached
    in objlayout_io_state->eof, and set in objlayout_read_done()
    into nfs_read_data->res.eof.

    So set it directly into nfs_read_data->res.eof and avoid
    the extra member.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Trond Myklebust

    Boaz Harrosh
     

15 Jun, 2011

1 commit

  • (d)printks should use %zd for ssize_t arguments not %ld, otherwise they might
    get a warning. I see the following with MN10300.

    fs/nfs/objlayout/objlayout.c: In function 'objlayout_read_done':
    fs/nfs/objlayout/objlayout.c:294: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t'

    Signed-off-by: David Howells
    cc: Trond Myklebust
    cc: linux-nfs@vger.kernel.org
    Signed-off-by: Trond Myklebust

    David Howells
     

30 May, 2011

6 commits

  • * Define API for io-engines to report delta_space_used in IOs
    * Encode the osd-layout specific information of the layoutcommit
    XDR buffer.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Benny Halevy

    Boaz Harrosh
     
  • An io_state pre-allocates an error information structure for each
    possible osd-device that might error during IO. When IO is done if all
    was well the io_state is freed. (as today). If the I/O has ended with an
    error, the io_state is queued on a per-layout err_list. When eventually
    encode_layoutreturn() is called, each error is properly encoded on the
    XDR buffer and only then the io_state is removed from err_list and
    de-allocated.

    It is up to the io_engine to fill in the segment that fault and the type
    of osd_error that occurred. By calling objlayout_io_set_result() for
    each failing device.

    In objio_osd:
    * Allocate io-error descriptors space as part of io_state
    * Use generic objlayout error reporting at end of io.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Benny Halevy

    Boaz Harrosh
     
  • With the use of the in-kernel osd library. Implement read/write
    of data from/to osd-objects according to information specified
    in the objects-layout.

    Support for stripping over mirrors with a received stripe_unit.
    There are however a few constrains which are not supported:
    1. Stripe Unit must be a multiple of PAGE_SIZE
    2. stripe length (stripe_unit * number_of_stripes) can not be
    bigger then 32bit.

    Also support raid-groups and partial-layout. Partial-layout is
    when not all the groups are received on the line, addressing
    only a partial range of the file.

    TODO:
    Only raid0! raid 4/5/6 support will come at later stage

    A none supported layout will send IO through the MDS

    [Important fallout from the last rebase]
    Signed-off-by: Boaz Harrosh
    [gfp_flags]
    Signed-off-by: Benny Halevy

    Boaz Harrosh
     
  • allocate and deallocate per-inode private pnfs_layout_hdr
    in preparation for I/O implementation.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Benny Halevy

    Benny Halevy
     
  • When a new layout is received in objio_alloc_lseg all device_ids
    referenced are retrieved. The device information is queried for from MDS
    and then the osd_device is looked-up from the osd-initiator library. The
    devices are cached in a per-mount-point list, for later use. At unmount
    all devices are "put" back to the library.

    objlayout_get_deviceinfo(), objlayout_put_deviceinfo() middleware
    API for retrieving device information given a device_id.

    TODO: The device cache can get big. Cap its size. Keep an LRU and start
    to return devices which were not used, when list gets to big, or
    when new entries allocation fail.

    [pnfs-obj: Bugs in new global-device-cache code]
    Signed-off-by: Boaz Harrosh
    [gfp_flags]
    [use global device cache]
    [use layout driver in global device cache]
    Signed-off-by: Benny Halevy

    Boaz Harrosh
     
  • objlayout_alloc_lseg prepares an xdr_stream and calls the
    raid engins objio_alloc_lseg() to allocate a private
    pnfs_layout_segment.

    objio_osd.c::objio_alloc_lseg() uses passed xdr_stream to
    decode and store the layout_segment information in an
    objio_segment struct, using the pnfs_osd_xdr.h API for
    the actual parsing the layout xdr.

    objlayout_free_lseg calls objio_free_lseg() to free the
    allocated space.

    Signed-off-by: Boaz Harrosh
    [gfp_flags]
    [removed "extern" from function definitions]
    Signed-off-by: Benny Halevy

    Boaz Harrosh