From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Oren Laadan <orenl@cs.columbia.edu>
Cc: Containers <containers@lists.linux-foundation.org>,
linux-fsdevel@vger.kernel.org, serue@us.ibm.com,
matthltc@us.ibm.com, sukadev@us.ibm.com
Subject: [RFC][cr][PATCH 1/6] Move file_lock macros into linux/fs.h
Date: Tue, 4 May 2010 22:30:49 -0700 [thread overview]
Message-ID: <20100505053049.GA20993@us.ibm.com> (raw)
In-Reply-To: <20100505053016.GA20483@us.ibm.com>
>From 3c9fd11b0bdd12ba7b3f78e7fc810f1d83ca6986 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date: Thu, 29 Apr 2010 23:33:39 -0700
Subject: [RFC][cr][PATCH 1/6] Move file_lock macros into linux/fs.h
Move IS_POSIX(), IS_FLOCK(), IS_LEASE() and 'for_each_lock()' into
include/linux/fs.h since these are also needed to checkpoint/restart
file-locks.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
fs/locks.c | 7 -------
include/linux/fs.h | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index 9cd859e..da53795 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -130,16 +130,9 @@
#include <asm/uaccess.h>
-#define IS_POSIX(fl) (fl->fl_flags & FL_POSIX)
-#define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK)
-#define IS_LEASE(fl) (fl->fl_flags & FL_LEASE)
-
int leases_enable = 1;
int lease_break_time = 45;
-#define for_each_lock(inode, lockp) \
- for (lockp = &inode->i_flock; *lockp != NULL; lockp = &(*lockp)->fl_next)
-
static LIST_HEAD(file_lock_list);
static LIST_HEAD(blocked_list);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ee725ff..909a535 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1088,6 +1088,13 @@ struct file_lock {
} fl_u;
};
+#define IS_POSIX(fl) (fl->fl_flags & FL_POSIX)
+#define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK)
+#define IS_LEASE(fl) (fl->fl_flags & FL_LEASE)
+
+#define for_each_lock(inode, lockp) \
+ for (lockp = &inode->i_flock; *lockp != NULL; lockp = &(*lockp)->fl_next)
+
/* The following constant reflects the upper bound of the file/locking space */
#ifndef OFFSET_MAX
#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1)))
--
1.6.0.4
next prev parent reply other threads:[~2010-05-05 5:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 5:30 [RFC][PATCH 0/6][cr]: Checkpoint/restart file locks and leases Sukadev Bhattiprolu
2010-05-05 5:30 ` Sukadev Bhattiprolu [this message]
2010-05-05 5:31 ` [RFC][cr][PATCH 2/6] Checkpoint file-locks Sukadev Bhattiprolu
2010-05-05 5:31 ` [RFC][cr][PATCH 3/6] Define flock_set() Sukadev Bhattiprolu
2010-05-05 5:31 ` [RFC][cr][PATCH 4/6] Restore file-locks Sukadev Bhattiprolu
2010-05-05 5:32 ` [RFC][cr][PATCH 5/6] Define do_setlease() Sukadev Bhattiprolu
2010-05-05 5:32 ` [RFC][cr][PATCH 6/6] Checkpoint/restart file leases 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=20100505053049.GA20993@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthltc@us.ibm.com \
--cc=orenl@cs.columbia.edu \
--cc=serue@us.ibm.com \
--cc=sukadev@us.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).