Re^2: stale NFS file handle

Christos Ricudis ricudis at paiko.gr
Sat May 16 03:12:04 EEST 1998


Hello Linux-greek-users!

Linux-greek-users wrote to (Tasos Bassoukos about "Re: stale NFS file handle":

 L> Kai to anaferei rhta oti kai na crasharei, kanenas den 8a pa8ei
 L> tipote. Ypori8etai oti to filehandle pou epistrefei einai
 L> apolytws autonomo wste o client na mporei na kanei oti 8elei
 L> apokei kai pera.

 L> Ti akrivws les esy oti krataei?

To problhma den einai o NFS server. 

To problhma einai ta file system semantics tou UNIX ta opoia DEN mporoyn na
ginoyn implement plhrws se stateless machines. 

Ena paradeigma. 

Xronos    Process A               Process B    ref count 
t1        create file                          1         
t2        write data                           1
t3                                open file    2
t4        unlink file                          2
t5        close file                           1
t6                                read data    1
t7                                close file   0

Ta unix semantics orizoyn oti ta blocks enos arxeioy DEN ginontai unallocate
oso to reference count toy inode einai megalytero toy mhdenos. Mporeis na
kaneis unlink ena arxeio th stigmh t4 kai na to diabaseis th stigmh t6 - ta
dedomena briskontai akoma ekei. 

Pws omws mporei na ginei ayto implement se ena NFS systhma? Kai ti 8a ginei an
o NFS server pesei metaksy twn stigmwn t5 kai t6? 

Allo klassiko : 

O client ektelei thn entolh link(). H link() epistrefei 0 an to link
dhmiourgh8hke kai -1 an den mporese na dhmiourgh8ei : 

Time     NFS Client                 NFS Server
t1       link()
t2       Send RPC request to server
t3                                  Receive RPC call from client
t4                                  execute link() and obtain result code
t5                                  Send result code to client
t6       Receive result code
t7       lock() suceeds

Des twra ti ginetai an pesei o NFS server metaksy twn t4 kai t5 : 

Time     NFS Client                 NFS Server
t1       link()
t2       Send RPC request to server
t3                                  Receive RPC call from client
t4                                  execute link() and obtain result code
t5                                  Server crashes and reboots
t6                                  Server is UP again
t7       RPC request TIMES OUT
t8       RESEND RPC request to server
t9                                  Receive RPC call from client
t10                                 execute link() - OUPS! To link yparxei hdh
t11                                 Return -1 and EEXIST result code to client
t12      Receive result code
t13      lock() fails

Apotelesma? Phrame ena error code GIA ENA OPERATION POU EKTELESTHKE KANONIKA. 

Alla ekei poy ginetai *TO* mperdema me to NFS einai sthn periptwsh twn locks. O
server kapoy prepei na krataei locking information gia ta open files (poia open
files? :>). Skepsou ti ginetai an symbei reboot :). 


Ciao,
  Christos
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at argos.hol.gr
Ta archives tis listas einai sto http://www.argos.hol.gr/lists :
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================



More information about the Linux-greek-users mailing list