On 02/05/2010 07:10 PM, andros@xxxxxxxxxx wrote: > From: Andy Adamson <andros@xxxxxxxxxx> > > Signed-off-by: Andy Adamson <andros@xxxxxxxxxx> > --- > fs/nfsd/nfs4pnfsdlm.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c > index 8cc7c84..83c4698 100644 > --- a/fs/nfsd/nfs4pnfsdlm.c > +++ b/fs/nfsd/nfs4pnfsdlm.c > @@ -316,7 +316,7 @@ static int dlm_ino_hash(struct inode *ino) > */ > de = nfsd4_find_pnfs_dlm_device(ino->i_sb->s_bdev->bd_disk->disk_name); > if (!de) > - return -EINVAL; > + return -1; > hash_mask = de->num_ds - 1; > return ino->i_ino & hash_mask; > } > @@ -340,7 +340,7 @@ static int nfsd4_pnfs_dlm_layoutget(struct inode *inode, > dprintk("%s first stripe index %d i_ino %lu\n", __func__, index, > inode->i_ino); > if (index < 0) > - return index; > + return nfserr_layoutunavailable; You are relaying on a side effect that undefined errors are nfserr_layoutunavailable. That's not so noble ;) I wish we would only allow nfserr_* and your first patch defines the allowed returns from layoutget (I can fix exofs, easily, if we just agree on protocol) Thanks Boaz > > res->lg_seg.layout_type = LAYOUT_NFSV4_FILES; > /* Always give out whole file layouts */ -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html