X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=fs%2Fgfs2%2Flm.c;h=f45c0ffd1c3564673f2bcd3ac3d45eaf1bdd71a5;hb=c6a756795d5ba0637aae8da89dd11bb7e3a1ee74;hp=cc7442261b2e707b1f6eef65322a62283568f782;hpb=2ff4782374dde5e3d76daf8a82eae396c0f76567;p=powerpc.git diff --git a/fs/gfs2/lm.c b/fs/gfs2/lm.c index cc7442261b..f45c0ffd1c 100644 --- a/fs/gfs2/lm.c +++ b/fs/gfs2/lm.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions @@ -13,12 +13,16 @@ #include #include #include -#include +#include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "lm.h" #include "super.h" +#include "util.h" +#include "lvb.h" /** * gfs2_lm_mount - mount a locking protocol @@ -80,7 +84,8 @@ int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent) void gfs2_lm_others_may_mount(struct gfs2_sbd *sdp) { if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) - sdp->sd_lockstruct.ls_ops->lm_others_may_mount(sdp->sd_lockstruct.ls_lockspace); + sdp->sd_lockstruct.ls_ops->lm_others_may_mount( + sdp->sd_lockstruct.ls_lockspace); } void gfs2_lm_unmount(struct gfs2_sbd *sdp) @@ -101,8 +106,8 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...) va_end(args); fs_err(sdp, "about to withdraw from the cluster\n"); - if (sdp->sd_args.ar_debug) - BUG(); + BUG_ON(sdp->sd_args.ar_debug); + fs_err(sdp, "waiting for outstanding I/O\n"); @@ -124,7 +129,8 @@ int gfs2_lm_get_lock(struct gfs2_sbd *sdp, struct lm_lockname *name, if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) error = -EIO; else - error = sdp->sd_lockstruct.ls_ops->lm_get_lock(sdp->sd_lockstruct.ls_lockspace, name, lockp); + error = sdp->sd_lockstruct.ls_ops->lm_get_lock( + sdp->sd_lockstruct.ls_lockspace, name, lockp); return error; } @@ -181,11 +187,13 @@ void gfs2_lm_unhold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb) sdp->sd_lockstruct.ls_ops->lm_unhold_lvb(lock, lvb); } +#if 0 void gfs2_lm_sync_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb) { if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) sdp->sd_lockstruct.ls_ops->lm_sync_lvb(lock, lvb); } +#endif /* 0 */ int gfs2_lm_plock_get(struct gfs2_sbd *sdp, struct lm_lockname *name, struct file *file, struct file_lock *fl) @@ -230,6 +238,7 @@ void gfs2_lm_recovery_done(struct gfs2_sbd *sdp, unsigned int jid, unsigned int message) { if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) - sdp->sd_lockstruct.ls_ops->lm_recovery_done(sdp->sd_lockstruct.ls_lockspace, jid, message); + sdp->sd_lockstruct.ls_ops->lm_recovery_done( + sdp->sd_lockstruct.ls_lockspace, jid, message); }