From: Douglas Gilbert <dougg@torque.net>
To: dmarkh@cfl.rr.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: SG_GET_ACCESS_COUNT ioctl problem
Date: Tue, 10 Jan 2006 18:23:22 +1000 [thread overview]
Message-ID: <43C36EFA.1040800@torque.net> (raw)
In-Reply-To: <43C119A0.8070304@cfl.rr.com>
Mark Hounschell wrote:
> In the 2.4 kernel (not using devfs) the SG_GET_ACCESS_COUNT ioctl to an
> sg device would report the correct/expected usage count when issued to a
> sd disc that was mounted, accounting for the mount by the system. The
> 2.6 kernel does not. Is this now the expected behavior or is this a bug?
Mark,
I think you can consider that ioctl deprecated in the
lk 2.6 series. The implementation of that ioctl in
lk 2.6.15 is not very encouraging:
case SG_GET_ACCESS_COUNT:
/* faked - we don't have a real access count anymore */
val = (sdp->device ? 1 : 0);
return put_user(val, ip);
which will yield 1 in almost all cases. In the lk 2.6 series
sysfs ** is meant to take over those sort of functions from
the sg driver. However struct scsi_device (one instance per
scsi device (normally a logical unit)) no longer seems to
maintain an access count.
I have written about the SG_IO ioctl and its various
implementations in the lk 2.6 series at:
http://www.torque.net/sg/sg_io.html
However I haven't addressed the status of the lesser used
sg ioctls (e.g. SG_GET_ACCESS_COUNT) in the lk 2.6 series.
** ..._GET_ACCESS_COUNT is more of a job for procfs than
sysfs.
Doug Gilbert
next prev parent reply other threads:[~2006-01-10 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-08 13:54 SG_GET_ACCESS_COUNT ioctl problem Mark Hounschell
2006-01-10 8:23 ` Douglas Gilbert [this message]
2006-01-10 8:38 ` Mark Hounschell
2006-01-10 9:06 ` Douglas Gilbert
2006-01-10 9:50 ` Mark Hounschell
-- strict thread matches above, loose matches on Subject: below --
2006-01-08 13:45 Mark Hounschell
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=43C36EFA.1040800@torque.net \
--to=dougg@torque.net \
--cc=dmarkh@cfl.rr.com \
--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.