lkml.org 
[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] Add a 'wait-scan' command to /proc/scsi/scsi.
    Date
    scsi_wait_scan.ko is a bad interface for a variety of reasons:
    - once you load it, it stays in memory doing nothing
    - if you need to call it again, you first need to check for the module
    and unload it first
    - waiting for scsi scans shouldn't require module loading privleges in
    any case

    This creates a simpler interface that doesn't require as much
    scaffolding in userspace.

    Signed-off-by: Bill Nottingham <notting@redhat.com>
    ---
    drivers/scsi/scsi_proc.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
    index 82f7b2d..c9f9e0c 100644
    --- a/drivers/scsi/scsi_proc.c
    +++ b/drivers/scsi/scsi_proc.c
    @@ -370,6 +370,8 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf,
    lun = simple_strtoul(p + 1, &p, 0);

    err = scsi_remove_single_device(host, channel, id, lun);
    + } else if (!strncmp("scsi wait-scan", buffer, 14)) {
    + err = scsi_complete_async_scans();
    }

    /*
    --
    1.6.2


    \
     
     \ /
      Last update: 2009-03-25 20:03    [W:0.019 / U:0.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site