All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: linux-scsi@vger.kernel.org
Subject: Re: [PATCH+RFC] sg: char_devs + seq_file lk2.6.0t6
Date: Sat, 11 Oct 2003 00:16:49 +1000	[thread overview]
Message-ID: <3F86BF51.8000609@torque.net> (raw)
In-Reply-To: <3F8296E6.9060302@torque.net>

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

Douglas Gilbert wrote:
> Changes to scsi generic (sg) driver [gzipped patch against
> lk 2.6.0-test6]:
>     - add "struct cdev" [char_devs] objects to increase
>       maximum number of sg devices from 256 to 8192
>     - use seq_file interface for /proc/scsi/sg/*
>       pseudo files
> 
> The first change re-introduces sg devices into sysfs.
> Each sg device has a directory (currently empty)
> with a name of the form: "/sys/cdev/major/sg<n>". When I tried
> adding 280 scsi "devices" with scsi_debug all the expected
> sg directories appeared (sg0..sg279). However sd registered
> the first 256 "disks" (up to /dev/sdiv) and failed thereafter
> with error "-16" (is anybody working on extending sd's
> disk and partition range?).
> 
> Would it be possible to put a symbolic link in the
> /sys/cdev/major/sg<n> directory to the corresponding
> sysfs scsi device (and vice versa)?

Well nobody objected so attached is another patch on
sg (as found in lk 2.6.0-test7) that additionally sets
up two symlinks from /sys/cdev/major/sg<n> to the
corresponding scsi device in sysfs and back again. A
pruned sysfs "tree" is also attached to illustrate.

Now I need to find somewhere in sysfs to place sg's
driver attributes (e.g. "allow_dio"). char_devs seem
to be deficient in this respect.

Doug Gilbert


[-- Attachment #2: sg260t7.diff.gz --]
[-- Type: application/x-gzip, Size: 5919 bytes --]

[-- Attachment #3: sg_symlinks.txt --]
[-- Type: text/plain, Size: 1520 bytes --]

.
|-- block
|   ...
|   |-- sda
|       |-- dev
|       |-- device -> ../../devices/pseudo_0/adapter0/host1/1:0:0:0
|       |-- queue
|        .......
|-- bus
|   ......
|   |-- pseudo
|   |   |-- devices
|   |   |   `-- adapter0 -> ../../../devices/pseudo_0/adapter0
|   |   `-- drivers
|   |       `-- scsi_debug
|   |           |-- adapter0 -> ../../../../devices/pseudo_0/adapter0
|   |           |-- add_host
|   |           .....
|   |-- scsi
|       |-- devices
|       |   `-- 1:0:0:0 -> ../../../devices/pseudo_0/adapter0/host1/1:0:0:0
|       `-- drivers
|           `-- sd
|               `-- 1:0:0:0 -> ../../../../devices/pseudo_0/adapter0/host1/1:0:0:0
|-- cdev
|   ....
|   |-- major
|       |-- sg0
|       |   `-- device -> ../../../devices/pseudo_0/adapter0/host1/1:0:0:0
|-- class
|   ...
|   |-- scsi_device
|   |   `-- 1:0:0:0
|   |       |-- device -> ../../../devices/pseudo_0/adapter0/host1/1:0:0:0
|   |       `-- driver -> ../../../bus/scsi/drivers/sd
|   |-- scsi_host
|       `-- host1
|           |-- cmd_per_lun
|           |-- device -> ../../../devices/pseudo_0/adapter0/host1
|           ....
|-- devices
    ....
    |-- pseudo_0
        |-- adapter0
            |-- detach_state
            |-- host1
                |-- 1:0:0:0
                    |-- block -> ../../../../../block/sda
                    |-- delete
                    |-- detach_state
                    |-- device_blocked
                    |-- generic -> ../../../../../cdev/major/sg0
                    .....

  reply	other threads:[~2003-10-10 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 10:35 [PATCH+RFC] sg: char_devs + seq_file lk2.6.0t6 Douglas Gilbert
2003-10-10 14:16 ` Douglas Gilbert [this message]
2003-11-07  5:57   ` [PATCH+RFC] sg: char_devs + seq_file lk2.6.0t9 Douglas Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F86BF51.8000609@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.