9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: Michael Baldwin <michael@cibernet.com>, 9fans@cse.psu.edu
Subject: Re: [9fans] 9pserve question
Date: Sat,  3 Dec 2005 11:03:59 -0600	[thread overview]
Message-ID: <20051203170359.DC9DB18AE27@dexter-peak.quanstro.net> (raw)
In-Reply-To: <6114CFD8-C785-425A-AEDB-5397D83E069C@cibernet.com>

good question.

i believe that this is the problem -- and it's not specific to the linux
9p "filesystem. fs/namei.c has this function which is called when trying
to open a file:

i didn't follow up on what put_write_access() does but i'm betting that
that generates the wstat.

  1324	int may_open(struct nameidata *nd, int acc_mode, int flag)
  1325	{
[...]
  1379		if (flag & O_TRUNC) {
  1380			error = get_write_access(inode);
  1381			if (error)
  1382				return error;
  1383	
  1384			/*
  1385			 * Refuse to truncate files with mandatory locks held on them.
  1386			 */
  1387			error = locks_verify_locked(inode);
  1388			if (!error) {
  1389				DQUOT_INIT(inode);
  1390				
  1391				error = do_truncate(dentry, 0);
  1392			}
  1393			put_write_access(inode);
  1394			if (error)
  1395				return error;
[...]

- erik

Michael Baldwin <michael@cibernet.com> writes

| 
| why is it doing Tstat and Twstat at all?   i would have thought it  
| would be Twalk, Topen, Twrite.


      parent reply	other threads:[~2005-12-03 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-03  3:13 erik quanstrom
2005-12-03 14:26 ` Russ Cox
2005-12-03 14:35   ` erik quanstrom
2005-12-03 14:54   ` erik quanstrom
2005-12-03 15:53     ` erik quanstrom
     [not found]     ` <6114CFD8-C785-425A-AEDB-5397D83E069C@cibernet.com>
2005-12-03 17:00       ` erik quanstrom
2005-12-03 17:03       ` erik quanstrom [this message]

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=20051203170359.DC9DB18AE27@dexter-peak.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    --cc=michael@cibernet.com \
    /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).