* [Ocfs2-devel] [PATCH] ocfs2_dlmfs: User DLM_* when decoding file open flags.
@ 2010-03-30 5:21 Tao Ma
2010-04-01 0:51 ` Joel Becker
0 siblings, 1 reply; 2+ messages in thread
From: Tao Ma @ 2010-03-30 5:21 UTC (permalink / raw)
To: ocfs2-devel
In commit 0016eedc4185a3cd7e578b027a6e69001b85d6c4, we have
changed dlmfs to use stackglue. So when use DLM* when we
decode dlm flags from open level.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
fs/ocfs2/dlmfs/dlmfs.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index 1b0de15..a99d1ea 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -112,20 +112,20 @@ MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES);
* O_RDONLY -> PRMODE level
* O_WRONLY -> EXMODE level
*
- * O_NONBLOCK -> LKM_NOQUEUE
+ * O_NONBLOCK -> NOQUEUE
*/
static int dlmfs_decode_open_flags(int open_flags,
int *level,
int *flags)
{
if (open_flags & (O_WRONLY|O_RDWR))
- *level = LKM_EXMODE;
+ *level = DLM_LOCK_EX;
else
- *level = LKM_PRMODE;
+ *level = DLM_LOCK_PR;
*flags = 0;
if (open_flags & O_NONBLOCK)
- *flags |= LKM_NOQUEUE;
+ *flags |= DLM_LKF_NOQUEUE;
return 0;
}
@@ -166,7 +166,7 @@ static int dlmfs_file_open(struct inode *inode,
* to be able userspace to be able to distinguish a
* valid lock request from one that simply couldn't be
* granted. */
- if (flags & LKM_NOQUEUE && status == -EAGAIN)
+ if (flags & DLM_LKF_NOQUEUE && status == -EAGAIN)
status = -ETXTBSY;
kfree(fp);
goto bail;
@@ -193,7 +193,7 @@ static int dlmfs_file_release(struct inode *inode,
status = 0;
if (fp) {
level = fp->fp_lock_level;
- if (level != LKM_IVMODE)
+ if (level != DLM_LOCK_IV)
user_dlm_cluster_unlock(&ip->ip_lockres, level);
kfree(fp);
--
1.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_dlmfs: User DLM_* when decoding file open flags.
2010-03-30 5:21 [Ocfs2-devel] [PATCH] ocfs2_dlmfs: User DLM_* when decoding file open flags Tao Ma
@ 2010-04-01 0:51 ` Joel Becker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2010-04-01 0:51 UTC (permalink / raw)
To: ocfs2-devel
On Tue, Mar 30, 2010 at 01:21:31PM +0800, Tao Ma wrote:
> In commit 0016eedc4185a3cd7e578b027a6e69001b85d6c4, we have
> changed dlmfs to use stackglue. So when use DLM* when we
> decode dlm flags from open level.
>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
This patch is now in the fixes branch of ocfs2.git.
Joel
--
"In the beginning, the universe was created. This has made a lot
of people very angry, and is generally considered to have been a
bad move."
- Douglas Adams
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-01 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 5:21 [Ocfs2-devel] [PATCH] ocfs2_dlmfs: User DLM_* when decoding file open flags Tao Ma
2010-04-01 0:51 ` Joel Becker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.