bug-hurd
[Top][All Lists]
Advanced

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

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


From: Svante Signell
Subject: RFC: [PATCH hurd 3/6] Add file record locking support: libtrivfs_file_record_lock.patch
Date: Mon, 08 Feb 2016 12:53:56 +0100

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) == 
MACH_MSG_TYPE_PROTECTED_PAYLOAD)
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.

Attachment: libtrivfs_file_record_lock.patch
Description: Text Data


reply via email to

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