01 Nov, 2011

1 commit


22 Sep, 2011

1 commit

  • The OSD protocol calls for all kind of security levels that use
    CRYPTO_HMAC and SH1, but the current code only supports NO_SEC,
    which does not use any of these.

    Remove a wrong FIXME that calls for them. Thanks Maxin for
    reporting on this.

    Reported-by: "Maxin B. John"
    Signed-off-by: Boaz Harrosh

    Boaz Harrosh
     

25 Jan, 2011

1 commit


09 Dec, 2010

1 commit


26 Oct, 2010

4 commits

  • This is a trivial addition to the SG API that can receive kernel
    pointers. It is only used by the out-of-tree test module. So
    it's immediate need is questionable. For maintenance ease it might
    just get in, as it's very small.

    John.
    do you need this in the Kernel, or is it only for osd_ktest.ko?

    Signed-off-by: John A. Chandy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • This patch adds the Scatter-Gather (sg) API to libosd.
    Scatter-gather enables a write/read of multiple none-contiguous
    areas of an object, in a single call. The extents may overlap
    and/or be in any order.

    The Scatter-Gather list is sent to the target in what is called
    a "cdb continuation segment". This is yet another possible segment
    in the osd-out-buffer. It is unlike all other segments in that it
    sits before the actual "data" segment (which until now was always
    first), and that it is signed by itself and not part of the data
    buffer. This is because the cdb-continuation-segment is considered
    a spill-over of the CDB data, and is therefor signed under
    OSD_SEC_CAPKEY and higher.

    TODO: A new osd_finalize_request_ex version should be supplied so
    the @caps received on the network also contains a size parameter
    and can be spilled over into the "cdb continuation segment".

    Thanks to John Chandy for the original
    code, and investigations. And the implementation of SG support
    in the osd-target.

    Original-coded-by: John Chandy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • At osd_end_request first free the request that might
    point to pages, then free these pages. In reverse order
    of allocation. For now it's just anal neatness. When we'll
    use mempools It'll also pay in performance.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • The _osd_req_finalize_attr_page was off by a mile, when trying to
    append the enc_get_attr segment instead of the proper set_attr segment.

    Also properly support when we don't have any attribute to set while
    getting a full page. And when clearing an attribute by setting it's
    size to zero.

    Reported-by: John Chandy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

15 Oct, 2010

1 commit

  • All file_operations should get a .llseek operation so we can make
    nonseekable_open the default for future file operations without a
    .llseek pointer.

    The three cases that we can automatically detect are no_llseek, seq_lseek
    and default_llseek. For cases where we can we can automatically prove that
    the file offset is always ignored, we use noop_llseek, which maintains
    the current behavior of not returning an error from a seek.

    New drivers should normally not use noop_llseek but instead use no_llseek
    and call nonseekable_open at open time. Existing drivers can be converted
    to do the same when the maintainer knows for certain that no user code
    relies on calling seek on the device file.

    The generated code is often incorrectly indented and right now contains
    comments that clarify for each added line why a specific variant was
    chosen. In the version that gets submitted upstream, the comments will
    be gone and I will manually fix the indentation, because there does not
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

03 Sep, 2010

1 commit

  • Return of the bi_rw tests is no longer bool after commit 74450be1. So
    testing against constants doesn't make sense anymore. Fix this bug in
    osd_req_read by removing "== 1" in test.

    This is not a problem now, where REQ_WRITE is 1, but this can change
    in the future and we don't want to rely on that.

    Signed-off-by: Jiri Slaby
    Signed-off-by: James Bottomley

    Jiri Slaby
     

08 Aug, 2010

1 commit

  • Remove the current bio flags and reuse the request flags for the bio, too.
    This allows to more easily trace the type of I/O from the filesystem
    down to the block driver. There were two flags in the bio that were
    missing in the requests: BIO_RW_UNPLUG and BIO_RW_AHEAD. Also I've
    renamed two request flags that had a superflous RW in them.

    Note that the flags are in bio.h despite having the REQ_ name - as
    blkdev.h includes bio.h that is the only way to go for now.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

03 Mar, 2010

1 commit


10 Dec, 2009

1 commit

  • So libosd has decided to sacrifice some code simplicity for the sake of
    a clean API. One of these things is the possibility for users to call
    osd_end_request, in any condition at any state. This opens up some
    problems with calling blk_put_request when out-side of the completion
    callback but calling __blk_put_request when detecting a from-completion
    state.

    The current hack was working just fine until exofs decided to operate on
    all devices in parallel and wait for the sum of the requests, before
    deallocating all osd-requests at once. There are two new possible cases
    1. All request in a group are deallocated as part of the last request's
    async-done, request_queue is locked.
    2. All request in a group where executed asynchronously, but
    de-allocation was delayed to after the async-done, in the context of
    another thread. Async execution but request_queue is not locked.

    The solution I chose was to separate the deallocation of the osd_request
    which has the information users need, from the deallocation of the
    internal(2) requests which impose the locking problem. The internal
    block-requests are freed unconditionally inside the async-done-callback,
    when we know the queue is always locked. If at osd_end_request time we
    still have a bock-request, then we know it did not come from within an
    async-done-callback and we can call the regular blk_put_request.

    The internal requests were used for carrying error information after
    execution. This information is now copied to osd_request members for
    later analysis by user code.

    The external API and behaviour was unchanged, except now it really
    supports what was previously advertised.

    Reported-by: Vineet Agarwal
    Signed-off-by: Boaz Harrosh
    Cc: Stable Tree
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

05 Dec, 2009

6 commits

  • Administer some love to the osd_req_decode_sense function

    * Fix a bad bug with osd_req_decode_sense(). If there was no scsi
    residual, .i.e the request never reached the target, then all the
    osd_sense_info members where garbage.

    * Add grossly missing in/out_resid to osd_sense_info and fill them in
    properly.

    * Define an osd_err_priority enum which divides the possible errors into
    7 categories in ascending severity. Each category is also assigned a
    Linux return code translation.

    Analyze the different osd/scsi/block returned errors and set the
    proper osd_err_priority and Linux return code accordingly.

    * extra check a few situations so not to get stuck with inconsistent
    error view. Example an empty residual with an error code, and other
    places ...

    Lots of libosd's osd_req_decode_sense clients had this logic in some
    form or another. Consolidate all these into one place that should
    actually know about osd returns. Thous translating it to a more
    abstract error.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • When an error was detected in an attribute list do to
    a target bug. We would print an error but spin endlessly
    regardless. Fix it.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • The (never tested) osd_sense_attribute_identification case
    has never worked. The loop was never advanced on.
    Fix it to work as intended.

    On 10/30/2009 04:39 PM, Roel Kluin wrote:
    I found this by code analysis, searching for while
    loops that test a local variable, but do not modify
    the variable.

    Reported-by: Roel Kluin
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • Define an osd_dev_info structure that Uniquely identifies an OSD
    device lun on the network. The identification is built from unique
    target attributes and is the same for all network/SAN machines.

    osduld_info_lookup() - NEW
    New API that will lookup an osd_dev by its osd_dev_info.
    This is used by pNFS-objects for cross network global device
    identification. And by exofs multy-device support, the device
    info is specified in the on-disk exofs device table.

    osduld_device_info() - NEW
    Given an osd_dev handle returns its associated osd_dev_info.
    The ULD fetches this information at startup and hangs it on
    each OSD device. (This is a fast operation that can be called
    at any condition)

    osduld_device_same() - NEW
    With a given osd_dev at one hand and an osd_dev_info
    at another, we would like to know if they are the same
    device.
    Two osd_dev handles can be checked by:
    osduld_device_same(od1, osduld_device_info(od2));

    osd_auto_detect_ver() - REVISED
    Now returns an osd_dev_info structure. Is only called once
    by ULD as before. See added comments for how to use.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • The true logic of this patch will be clear in the next patch where we
    use the class_find_device() API. When doing so the use of an internal
    kref leaves us a narrow window where a find is started while the actual
    object can go away. Using the device's kobj reference solves this
    problem because now the same kref is used for both operations. (Remove
    and find)

    Core changes
    * Embed a struct device in uld_ structure and use device_register
    instead of devie_create. Set __remove to be the device release
    function.
    * __uld_get/put is just get_/put_device. Now every thing is accounted
    for on the device object. Internal kref is removed.
    * At __remove() we can safely de-allocate the uld_ structure. (The
    function has moved to avoid forward declaration)

    Some cleanups
    * Use class register/unregister is cleaner for this driver now.
    * cdev ref-counting games are no longer necessary

    I have incremented the device version string in case of new bugs.

    Note: Previous bugfix of taking the reference around fput() still
    applies.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • If scsi has released the device (logout), and exofs has last
    reference on the osduld_device it will be freed by
    osd_uld_release() within the call to fput(). But this will
    oops in cdev_release() which is called after the fops->release.
    (cdev is embedded within osduld_device). __uld_get/put pair
    makes sure we have a cdev for the duration of fput()

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

12 Jun, 2009

1 commit


10 Jun, 2009

8 commits

  • * Delete Makefile. It is only used for out-of-tree compilation
    and was never needed. It slipped in by mistake.
    * Remove from Kbuild all the out of tree stuff as promised.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • libosd has it's own sense decoding and printout. Don't
    let scsi_lib duplicate that printout. (Which is done wrong
    in regard to osd commands)

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • This patch was inspired by Al Viro, for simplifying and fixing the
    retrieval of osd-devices by in-kernel users, eg: file systems.
    In-Kernel users, now, go through the same path user-mode does by
    opening a file on the osd char-device and though holding a reference
    to both the device and the Module.

    A file pointer was added to the osd_dev structure which is now
    allocated for each user. The internal osd_dev is no longer exposed
    outside of the uld. I wanted to do that for a long time so each
    libosd user can have his own defaults on the device.

    The API is left the same, so user code need not change.

    It is no longer needed to open/close a file handle on the osd
    char-device from user-mode, before mounting an exofs on it.

    Signed-off-by: Boaz Harrosh
    CC: Al Viro
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • libosd users that need to work with bios, must sometime use
    the request_queue associated with the osd_dev. Make a wrapper for
    that, and convert all in-tree users.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • For supporting of chained-bios we can not inspect the first
    bio only, as before. Caller shall pass the total length of the
    request, ie. sum_bytes(bio-chain).

    Also since the bio might be a chain we don't set it's direction
    on behalf of it's callers. The bio direction should be properly
    set prior to this call. So fix a couple of write users that now
    need to set the bio direction properly

    [In this patch I change both library code and user sites at
    exofs, to make it easy on integration. It should be submitted
    via James's scsi-misc tree.]

    Signed-off-by: Boaz Harrosh
    CC: Jeff Garzik
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • _osd_req_finalize_data_integrity was trying to deduce the number of
    out_bytes from passed osd_request->out.bio. This is wrong when
    the bio is chained. The caller of _osd_req_finalize_data_integrity
    has more ready available information and should just pass it.

    Also in the light of future support for CDB-continuation segment this is
    a better solution.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • By popular demand, define usefull wrappers for osd_req_read/write
    that recieve kernel pointers. All users had their own.

    Also remove these from exofs

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • Shorten out the Attributes names.
    Align all results on column 24.
    Print system ID in a new line.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

23 May, 2009

1 commit


19 May, 2009

2 commits

  • Use new blk_make_request() to allocate a request from bio
    and avoid using deprecated blk_rq_append_bio().

    This patch is dependent on a block layer patch titled:
    [BLOCK] New blk_make_request() takes bio returns request

    This is the last usage of blk_rq_append_bio in osd, it can now
    be un-exported.

    Signed-off-by: Boaz Harrosh
    CC: Jeff Garzik
    CC: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    Boaz Harrosh
     
  • Now that blk_rq_map_kern will append the buffer onto the
    request we can use it easily for adding extra segments
    (eg. attributes)

    This patch is dependent on a block layer patch titled:
    [BLOCK] allow blk_rq_map_kern to append to requests

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Jens Axboe

    Boaz Harrosh
     

11 May, 2009

1 commit

  • With recent unification of fields, it's now guaranteed that
    rq->data_len always equals blk_rq_bytes(). Convert all non-IDE direct
    users to accessors. IDE will be converted in a separate patch.

    Boaz: spotted incorrect data_len/resid_len conversion in osd.

    [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]

    Signed-off-by: Tejun Heo
    Acked-by: Sergei Shtylyov
    Cc: Pete Zaitcev
    Cc: Eric Moore
    Cc: Markus Lidel
    Cc: Darrick J. Wong
    Cc: James Bottomley
    Cc: Eric Moore
    Cc: Boaz Harrosh
    Cc: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    Tejun Heo
     

09 May, 2009

1 commit


28 Apr, 2009

4 commits

  • OSC's OSD2 target: [git clone git://git.open-osd.org/osc-osd/ master]
    (Initiator code prior to this patch must use: "git checkout CDB_VER_OSD2r01"
    in the target tree above)

    This is a summery of the wire changes:

    * OSDv2_ADDITIONAL_CDB_LENGTH == 192 => 228 (Total CDB is now 236 bytes)
    * Attributes List Element Header grew, so attribute values are 8 bytes
    aligned.
    * Cryptographic keys and signatures are 20 => 32
    * Few new definitions.

    (Still missing new standard definitions attribute values, these do not change
    wire format and will be added later when needed)

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • In OSD2r04 draft, cryptographic key size changed to 32 bytes from
    OSD1's 20 bytes. This causes a couple of on-the-wire structures
    to change, including the CDB.

    In this patch the OSD1/OSD2 handling is separated out in regard
    to affected structures, but on-the-wire is still the same. All
    on the wire changes will be submitted in one patch for bisect-ability.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • In OSD2r05 draft each attribute list element header was changed
    so attribute-value would be 8 bytes aligned. In OSD2r01-r04
    it was aligned on 2 bytes. (This is because in OSD2r01 the complete
    element was 8 bytes padded at end but the header was not adjusted
    and caused permanent miss-alignment.)

    OSD1 elements are not padded and might be or might not be aligned.
    OSD1 is still supported.

    In this code we do all the code re-factoring to separate OSD1/OSD2
    differences but do not change actual wire format. All wire format
    changes will happen in one patch later, for bisect-ability.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • bio_map_kern() returns an ERR_PTR() not NULL.

    Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Dan Carpenter
     

03 Apr, 2009

2 commits

  • Remove the creation of the symlink from the device to
    it's class. On modern systems this is already created by
    a udev rule and would WARN on load. On old systems it is
    not needed, none of the current osd user-mode tools use
    this link.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • A fix for a very serious and stupid bug in osd_initiator. It
    used to call blk_put_request() regardless of if it was from
    the end_io callback or if called after a sync execution.
    It should call the unlocked version __blk_put_request() instead.

    Also fixed is the remove of _abort_unexecuted_bios hack, and use of
    blk_end_request(,-ERROR,) to deallocate half baked requests. I've
    audited the code and it should be safe.

    Reported and
    Tested-by: Xu Yang
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh