9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sam <sah@softcardsystems.com>
To: 9fans@cse.psu.edu
Subject: [9fans] device close
Date: Mon, 23 May 2005 14:47:17 -0500	[thread overview]
Message-ID: <Pine.LNX.4.60.0505231426220.21782@athena> (raw)

In my aoe driver I'm getting closes on QIDs that were never
opened:

(assuming devaoe is bound to the CWD)


rb1# echo bind /net/ether1 >aoectl
aoeopen: c->qid.path=0x2
aoeclose: c->qid.path=0x2
rb1# cd aoe2.9
rb1# ls -l
aoeclose: c->qid.path=0x16
aoeopen: c->qid.path=0x16
aoeclose: c->qid.path=0x16
--rw-rw-rw-  0 dennis dennis           0 May 23 14:44 config
--rw-rw-rw-  0 dennis dennis           0 May 23 14:44 ctl
--rw-rw-rw-  0 dennis dennis 41174138880 May 23 14:44 data
--r--r--r--  0 dennis dennis           0 May 23 14:44 stat
rb1# ls -l data
aoeclose: c->qid.path=0x19
aoe2.9 data close (nopen=0)
called from 8016c789
--rw-rw-rw-  0 dennis dennis 41174138880 May 23 14:44 data


8016c789 is in cclose. (which is obvious now)

I had hoped to keep a reference count on data so i can know
whether or not it's safe to switch to a new disk on the same
blade.  I don't think it's very fair to change disks while a
proc is holding the device open for IO.

Devwalk seems to be the immediate culprit, but I don't think
it's wrong.  How would one do ref counting in the face of
dup'ing channels and potentially open references using the
dev architecture?

Cheers,

Sam



             reply	other threads:[~2005-05-23 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-23 19:47 Sam [this message]
2005-05-23 20:10 ` Russ Cox

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=Pine.LNX.4.60.0505231426220.21782@athena \
    --to=sah@softcardsystems.com \
    --cc=9fans@cse.psu.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).