[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: [PATCH hurd 3/6] Add file record locking support: libtrivfs_fil

From: Justus Winter
Subject: Re: RFC: [PATCH hurd 3/6] Add file record locking support: libtrivfs_file_record_lock.patch
Date: Mon, 08 Feb 2016 14:19:56 +0100
User-agent: alot/0.3.8.dev

Quoting Svante Signell (2016-02-08 12:53:56)
> Proxy implementation added to the original patches.
> Note: This proxy version does not work, e.g. set_fcntl /dev/null gives error
> code EACCES. The problem has been traced down to fsServer.c:
> 3386: if (MACH_MSGH_BITS_LOCAL (In0P->Head.msgh_bits) == 
> 3387:   file = 
> diskfs_begin_using_protid_payload(In0P>Head.msgh_protected_payload);
> 3388: else
> 3389:   file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port);
> 3390:
> 3391: OutP->RetCode = diskfs_S_file_record_lock(file, In0P->cmd, 
> &In0P->flock64);
> 3392: diskfs_end_using_protid_port(file);
> Test case: set-fcntl /dev/null
> After the call on line 3387
> file->po->openstat=0
> while for set-fnctl foo it is
> file->po->openstat=3
> Setting it to 3 in gdb makes the program finish successfully.
> Comments:
> - The proxy implementation obviously does not work. How to activate the else
> part for testing purposes?
> - I have a working solution, which adds two new structs to struct 
> trivfs_peropen
>   struct rlock_peropen lock_status;
>   struct trivfs_node *tp;
> This solution was not accepted, and maybe finding the bug in
> diskfs_begin_using_protid_payload generated by MIG? would be much better.


As I said on IRC, there is no evidence that the protected payload
mechanism is not working as expected.  We are using it for every
single RPC that a Hurd server services since Hurd 0.6.

But if you insist, take an old gnumach that doesn't do the protected
payload thing and use it to boot.  Protected payloads are used as an
optimization, and the Hurd will fall back to the hash table lookup.

That openstat is 0 has nothing to do with protected payloads.  I
believe it is because the underlying node of the 'null' translator is
opened with flags=0.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]