HSM _not only_ small fixes and to do list goes here
(LU-3647)
|
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.5.0 |
| Fix Version/s: | None |
| Type: | Technical task | Priority: | Blocker |
| Reporter: | Alexey Lyashkov | Assignee: | WC Triage |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Rank (Obsolete): | 10041 |
| Description |
|
As i see, HSM patch have a land LL_IOC_SET_LEASE support. first of all, if lease conflict found - we need notify an application via sending an signal to release a lease, but implementation do NOTHING in that area. current implementation do NOTHING for both, so broke both NFS v4 and clustered samba. |
| Comments |
| Comment by Alexey Lyashkov [ 31/Aug/13 ] |
|
to reference When a process (the "lease breaker") performs an open(2) or
truncate(2) that conflicts with a lease established via F_SETLEASE,
the system call is blocked by the kernel and the kernel notifies the
lease holder by sending it a signal (SIGIO by default). The lease
holder should respond to receipt of this signal by doing whatever
cleanup is required in preparation for the file to be accessed by
another process (e.g., flushing cached buffers) and then either
remove or downgrade its lease. A lease is removed by performing an
F_SETLEASE command specifying arg as F_UNLCK. If the lease holder
currently holds a write lease on the file, and the lease breaker is
opening the file for reading, then it is sufficient for the lease
holder to downgrade the lease to a read lease. This is done by
performing an F_SETLEASE command specifying arg as F_RDLCK.
If the lease holder fails to downgrade or remove the lease within the
number of seconds specified in /proc/sys/fs/lease-break-time then the
kernel forcibly removes or downgrades the lease holder's lease.
I think someone should be read a linux man page more carefully. |
| Comment by Jinshan Xiong (Inactive) [ 31/Aug/13 ] |
|
Right now, lustre release is only for HSM use so it didn't implement Linux lease semantics exactly. The framework is there so it can be easily extended to linux semantic by adding notification mechanism in ll_md_blocking_lease_ast() to send signal to lease holder. However the major difficult is in the lease request side because there is no callback to Lustre in linux kernel, in other words, linux lease is a pure VFS stuff. This implies that it's impossible to use Lustre lease via standard lease interfaces in libc. If you have resources on your side, you can finish the work by composing a kernel patch to add lease callbacks to file system and finish notification interfaces in ll_md_blocking_lease_ast(). |
| Comment by Andreas Dilger [ 04/Sep/13 ] |
|
Per discussion between Oleg and Shadow, this is not actually a bug. |