From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Sukadev Bhattiprolu
<sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [Patch 0/2] Checkpoint and restart of file locks
Date: Tue, 11 Jan 2011 19:30:55 -0500 [thread overview]
Message-ID: <4D2CF63F.5090300@cs.columbia.edu> (raw)
In-Reply-To: <20110112001700.GB7229-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
On 01/11/2011 07:17 PM, Sukadev Bhattiprolu wrote:
> Oren Laadan [orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org] wrote:
> |
> | The following two patches add c/r support for POSIX file locks. They
> | are based on the series posted by Suka some time ago:
> | https://lists.linux-foundation.org/pipermail/containers/2010-October/025855.html
> |
> | Suka:
> |
> | When I read your post I thought that boht posix and flock were
> | supported, but looking at the code I saw only posix. Am I missing
> | anything ?
>
> Hmm. I have been working with only the posix locks for starters since
> it checkpoints/restarts the more general, 'struct file_lock' object.
>
> But I should make that explicit. If a patch description implies that
> it covers flocks can be checkpointed, please let me know and I will
> fix it.
>
Ok, just checking - I already modified the patch description
and the inline comments.
> C/R of leases/file-owner info is blocked on C/R of 'struct pids'.
It's in the working ...
>
> |
> | Also, I'm not sure that all the input is well sanitized during
> | restart - for example, the possible values for the lock flags.
> | Any thoughts ?
>
> I have this check in restore_file_locks():
>
> + ret = -EBADF;
> + if (h->fl_flags & FL_POSIX)
> + ret = restore_one_posix_lock(ctx, file, fd,
In this specific example, I fixed it to ensure that only one of
FL_POSIX, FL_FLOCK and FL_LEASE is is present.
(Actually, now I see that I used fl_type, and I should fix it to
be fl_flags, but the intent was good ...)
>
> The other fields (lock type for instance) will be validated by flock64_set()
> as for a new fcntl() call - no ?
That's what I was asking :o
>
> |
> | Lastly, do you have test cases to run against this patch and test
> | it ?
>
> Yes, I added some tests to cr-tests a while ago and then updated them.
> Will find the updates and post them.
Thanks,
Oren.
next prev parent reply other threads:[~2011-01-12 0:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1288333001-28838-1-git-send-email-sukadev@linux.vnet.ibm.com>
[not found] ` <1288333001-28838-1-git-send-email-sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2010-10-29 6:16 ` [PATCH 1/5][v5][cr]: Move file_lock macros into linux/fs.h Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 2/5][v5][cr]: Define flock_set() Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 3/5][v5][cr]: Define flock64_set() Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 4/5][v5][cr]: Checkpoint/restore file-locks Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 5/5][v5][cr]: Document design of C/R of file-locks Sukadev Bhattiprolu
2010-10-29 14:31 ` [PATCH 0/5][v5][cr] Checkpoint/restart file locks Lin Ming
2011-01-11 1:37 ` [Patch 0/2] Checkpoint and restart of " Oren Laadan
[not found] ` <1294709825-23357-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-01-12 0:17 ` Sukadev Bhattiprolu
[not found] ` <20110112001700.GB7229-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-01-12 0:30 ` Oren Laadan [this message]
2011-01-11 1:37 ` [PATCH 1/2] Refactor fcntl_setlk() and fcntl_setlk64() Oren Laadan
2011-01-11 1:37 ` [PATCH 2/2] c/r: add checkpoint support for file-locks Oren Laadan
[not found] ` <AANLkTiktKVuAtjPaHT9d+7ATpKn+jMonFYzeEmd85L3o@mail.gmail.com>
[not found] ` <AANLkTiktKVuAtjPaHT9d+7ATpKn+jMonFYzeEmd85L3o-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-29 18:35 ` [PATCH 0/5][v5][cr] Checkpoint/restart file locks Sukadev Bhattiprolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D2CF63F.5090300@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox