9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Anthony Martin <ality@pbrane.org>
To: 9fans <9fans@9fans.net>
Subject: [9fans] Re: What's a mounted channel?
Date: Sat, 29 May 2021 22:11:07 -0700	[thread overview]
Message-ID: <YLMeOXByf1UEdxbF@alice> (raw)
In-Reply-To: <1794694518.393629.1622320572251@ichabod.co-bxl>

Anonymous AWK fan via 9fans <9fans@9fans.net> once said:
> The comments on the #define lines and a commented out section of
> stat(2) say (DM|QT)MOUNT indicates a mounted channel, what is this?
>
> Also, why does exportfs fork and the kernel not send write on closed
> pipe notes for mounted channels?

When you call mount(2), the mnt(3) driver attempts to
negotiate a conversation with the 9p server on the other
end of the supplied file descriptor. If the negotiation
is successful, the kernel sets a flag on the underlying
channel to restrict the set of operations available to
user space until the file descriptor is closed. If this
wasn't done, any reads, writes, or seeks would interfere
with the mount driver's ongoing 9p conversation.

Cheers,
  Anthony

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T07cb7686febe72c8-M1734aaea903ed27f61612f56
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

      reply	other threads:[~2021-05-30  5:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 20:36 [9fans] " Anonymous AWK fan via 9fans
2021-05-30  5:11 ` Anthony Martin [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=YLMeOXByf1UEdxbF@alice \
    --to=ality@pbrane.org \
    --cc=9fans@9fans.net \
    /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).