Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: fix regression in ocfs2_read_blocks_sync()
  ocfs2: fix return value set in init_dlmfs_fs()
  ocfs2: Small documentation update
  ocfs2: fix wake_up in unlock_ast
  ocfs2: initialize stack_user lvbptr
  ocfs2: comments typo fix
This commit is contained in:
Linus Torvalds 2008-12-01 18:56:55 -08:00
commit 8650e51ac9
7 changed files with 13 additions and 19 deletions

View File

@ -28,10 +28,7 @@ Manish Singh <manish.singh@oracle.com>
Caveats Caveats
======= =======
Features which OCFS2 does not support yet: Features which OCFS2 does not support yet:
- extended attributes
- quotas - quotas
- cluster aware flock
- cluster aware lockf
- Directory change notification (F_NOTIFY) - Directory change notification (F_NOTIFY)
- Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
- POSIX ACLs - POSIX ACLs

View File

@ -112,7 +112,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
bh = bhs[i]; bh = bhs[i];
if (buffer_jbd(bh)) { if (buffer_jbd(bh)) {
mlog(ML_ERROR, mlog(ML_BH_IO,
"trying to sync read a jbd " "trying to sync read a jbd "
"managed bh (blocknr = %llu), skipping\n", "managed bh (blocknr = %llu), skipping\n",
(unsigned long long)bh->b_blocknr); (unsigned long long)bh->b_blocknr);
@ -147,15 +147,10 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
for (i = nr; i > 0; i--) { for (i = nr; i > 0; i--) {
bh = bhs[i - 1]; bh = bhs[i - 1];
if (buffer_jbd(bh)) { /* No need to wait on the buffer if it's managed by JBD. */
mlog(ML_ERROR, if (!buffer_jbd(bh))
"the journal got the buffer while it was " wait_on_buffer(bh);
"locked for io! (blocknr = %llu)\n",
(unsigned long long)bh->b_blocknr);
BUG();
}
wait_on_buffer(bh);
if (!buffer_uptodate(bh)) { if (!buffer_uptodate(bh)) {
/* Status won't be cleared from here on out, /* Status won't be cleared from here on out,
* so we can safely record this and loop back * so we can safely record this and loop back
@ -251,8 +246,6 @@ int ocfs2_read_blocks(struct inode *inode, u64 block, int nr,
ignore_cache = 1; ignore_cache = 1;
} }
/* XXX: Can we ever get this and *not* have the cached
* flag set? */
if (buffer_jbd(bh)) { if (buffer_jbd(bh)) {
if (ignore_cache) if (ignore_cache)
mlog(ML_BH_IO, "trying to sync read a jbd " mlog(ML_BH_IO, "trying to sync read a jbd "

View File

@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
SLAB_MEM_SPREAD), SLAB_MEM_SPREAD),
dlmfs_init_once); dlmfs_init_once);
if (!dlmfs_inode_cache) if (!dlmfs_inode_cache) {
status = -ENOMEM;
goto bail; goto bail;
}
cleanup_inode = 1; cleanup_inode = 1;
user_dlm_worker = create_singlethread_workqueue("user_dlm"); user_dlm_worker = create_singlethread_workqueue("user_dlm");

View File

@ -33,7 +33,7 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
/* user_lock_res->l_flags flags. */ /* user_lock_res->l_flags flags. */
#define USER_LOCK_ATTACHED (0x00000001) /* have we initialized #define USER_LOCK_ATTACHED (0x00000001) /* we have initialized
* the lvb */ * the lvb */
#define USER_LOCK_BUSY (0x00000002) /* we are currently in #define USER_LOCK_BUSY (0x00000002) /* we are currently in
* dlm_lock */ * dlm_lock */

View File

@ -2841,9 +2841,8 @@ static void ocfs2_unlock_ast(void *opaque, int error)
lockres_clear_flags(lockres, OCFS2_LOCK_BUSY); lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
lockres->l_unlock_action = OCFS2_UNLOCK_INVALID; lockres->l_unlock_action = OCFS2_UNLOCK_INVALID;
spin_unlock_irqrestore(&lockres->l_lock, flags);
wake_up(&lockres->l_event); wake_up(&lockres->l_event);
spin_unlock_irqrestore(&lockres->l_lock, flags);
mlog_exit_void(); mlog_exit_void();
} }

View File

@ -85,7 +85,7 @@ enum ocfs2_unlock_action {
}; };
/* ocfs2_lock_res->l_flags flags. */ /* ocfs2_lock_res->l_flags flags. */
#define OCFS2_LOCK_ATTACHED (0x00000001) /* have we initialized #define OCFS2_LOCK_ATTACHED (0x00000001) /* we have initialized
* the lvb */ * the lvb */
#define OCFS2_LOCK_BUSY (0x00000002) /* we are currently in #define OCFS2_LOCK_BUSY (0x00000002) /* we are currently in
* dlm_lock */ * dlm_lock */

View File

@ -740,6 +740,9 @@ static int user_dlm_lock_status(union ocfs2_dlm_lksb *lksb)
static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb) static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
{ {
if (!lksb->lksb_fsdlm.sb_lvbptr)
lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb +
sizeof(struct dlm_lksb);
return (void *)(lksb->lksb_fsdlm.sb_lvbptr); return (void *)(lksb->lksb_fsdlm.sb_lvbptr);
} }