forsyth20121205-174063a80cc13 years agoHistory
84 lines · 2.3 KB · Text
RawDownload
.TH MNT 3 .SH NAMEmnt \- attach to 9P servers.SH SYNOPSIS.nf.B #M.fi.SH DESCRIPTIONThe.I mount driveris used by.B Sys->mount(but not.BR Sys->bind ;see.IR sys-bind (2))to connect the name space of a process tothe service provided by a 9P server over a communications channel.After the.BR mount ,file operations in that portion of the name space willbe converted by the mount driver into the appropriate9P messages to the server, and its 9P replies returnedas the status of the system calls..PPAny authentication must precede.IR mount ,which does none itself;see.IR security-intro (2)for a discussion of the authentication and securitymechanisms provided `ready made' by Inferno, butany other scheme can be agreed between client and server.The.I mountsystem call does, however, issue an.IR attach (5)message to the server to identify the user of the connection.Each distinct user of a connection must mount it separately;the mount driver multiplexes the access of the various users and theirprocesses to the service..PPFile-oriented system calls are converted by the kernel into messages in the 9P protocol.Within the kernel, 9P is implemented by procedure calls to thevarious kernel device drivers, as described in.IR intro (10)and.IR dev (10.2).The mount driver translates these procedure calls into remote procedure callsto be transmitted as messages over the communication channel to the server.Each message is implemented by a writeof the corresponding protocol message to the server channelfollowed by a read on the server channel to get the reply.Errors in the reply message are turned into system call error returns..PPA.IR sys-read (2)or.I Sys->writesystem call on a file served by the mount drivermay be translatedinto more than onemessage,since there is a maximum data size for a 9P message.The system callwill return when the specified number of bytes have been transferredor a short reply is returned..PPThe string.L #Mis an illegal file name,so this device can be accessed directly only by the kernel..SH "SEE ALSO".IR bind (1),.IR sys-bind (2).SH SOURCE.B /emu/port/devmnt.c.br.B /os/port/devmnt.c.SH BUGSWhen mounting a service through the mount driver,that is, when the channel being multiplexed is itselfa file being served by the mount driver,large messages may be broken in two.