[LU-5252] HSM: update fifo event API and code Created: 24/Jun/14  Updated: 18/Aug/14  Resolved: 25/Jul/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.1
Fix Version/s: Lustre 2.7.0, Lustre 2.5.3

Type: Bug Priority: Minor
Reporter: Frank Zago (Inactive) Assignee: James Nunez (Inactive)
Resolution: Fixed Votes: 0
Labels: HSM, patch

Severity: 3
Rank (Obsolete): 14650

 Description   

Neither llapi_hsm_register_event_fifo() nor
llapi_hsm_unregister_event_fifo() take a const as their argument. This
lead to the following compilation warning when a caller is using a
const char *:

    
      ... warning: passing argument 1 of ‘llapi_hsm_register_event_fifo’ discards ‘const’ qualifier from pointer target type [enabled by default]
       rc = llapi_hsm_register_event_fifo(lustre_fifo_event);
       ^
      ... note: expected ‘char *’ but argument is of type ‘const char *’
      extern int llapi_hsm_register_event_fifo(char *path);

Also, llapi_hsm_event_fd is local, so make it static.

And finally, do not unconditionally delete the HSM event fifo.
The lustreapi HSM library will use a pipe if it already exists.
However the deregistration will unconditionally delete that pipe,
which is not correct.

An admin may want to create the pipe with certain rights/ownership,
which the llapi_hsm_register_event_fifo() doesn't allow. In that case,
llapi_hsm_unregister_event_fifo() should not delete it.

Patches to follow.



 Comments   
Comment by Frank Zago (Inactive) [ 24/Jun/14 ]

API change: http://review.whamcloud.com/10807

static fd: http://review.whamcloud.com/10808

fifo deletion: http://review.whamcloud.com/10809

Comment by James Nunez (Inactive) [ 25/Jul/14 ]

All three patches landed to master.

Comment by James Nunez (Inactive) [ 12/Aug/14 ]

Patch for b2_5 at:
http://review.whamcloud.com/#/c/11363/
http://review.whamcloud.com/#/c/11362/
http://review.whamcloud.com/#/c/11421/

Generated at Sat Feb 10 01:49:51 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.