Message ID | 1380220807-12857-1-git-send-email-bhalevy@primarydata.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Sep 26, 2013 at 02:40:07PM -0400, Benny Halevy wrote: > From: Dean Hildebrand <seattleplus@gmail.com> I don't understand why we need to do this. Also: based on the previous patch I believe we set the EXCHGID4_FLAG_USE_PNFS_MDS bit in the reply unconditionally, so regardless of what the client requests we're permitting it to use this client as a MDS (or plain non-pnfs) server, so I'm not sure it matters what the client requested. Could you just drop this patch? Unless you have some good argument for it. --b. > > [was pnfsd: Add use of pnfs exchange flags] > Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com> > [pnfsd: define a is_ds_only_session helper] > Signed-off-by: Benny Halevy <bhalevy@panasas.com> > Signed-off-by: Benny Halevy <bhalevy@primarydata.com> > --- > fs/nfsd/nfs4state.c | 4 ++++ > include/uapi/linux/nfs4.h | 7 +++++++ > 2 files changed, 11 insertions(+) > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > index 21c15fc..2c973e6 100644 > --- a/fs/nfsd/nfs4state.c > +++ b/fs/nfsd/nfs4state.c > @@ -1953,6 +1953,10 @@ static __be32 nfsd4_check_cb_sec(struct nfsd4_cb_sec *cbs) > status = nfserr_seq_misordered; > goto out_free_conn; > } > + > + if (is_ds_only_session(unconf->cl_exchange_flags)) > + cr_ses->flags &= ~SESSION4_BACK_CHAN; > + > old = find_confirmed_client_by_name(&unconf->cl_name, nn); > if (old) { > status = mark_client_expired(old); > diff --git a/include/uapi/linux/nfs4.h b/include/uapi/linux/nfs4.h > index 788128e..028f5fc 100644 > --- a/include/uapi/linux/nfs4.h > +++ b/include/uapi/linux/nfs4.h > @@ -125,6 +125,13 @@ > #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 > #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 > > +static inline bool > +is_ds_only_session(u32 exchange_flags) > +{ > + u32 mask = EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_PNFS_MDS; > + return (exchange_flags & mask) == EXCHGID4_FLAG_USE_PNFS_DS; > +} > + > #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 > #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 > /* > -- > 1.8.3.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2013-09-26 18:01, J. Bruce Fields wrote: > On Thu, Sep 26, 2013 at 02:40:07PM -0400, Benny Halevy wrote: >> From: Dean Hildebrand <seattleplus@gmail.com> > > I don't understand why we need to do this. The motivation was that the DS doesn't need the backchannel as it will never issue any recalls or other callback ops. > > Also: based on the previous patch I believe we set the > EXCHGID4_FLAG_USE_PNFS_MDS bit in the reply unconditionally, so > regardless of what the client requests we're permitting it to use this > client as a MDS (or plain non-pnfs) server, so I'm not sure it matters > what the client requested. Hmm, True. > > Could you just drop this patch? Unless you have some good argument for > it. Yup. I see no problem in dropping it. Benny > > --b. > >> >> [was pnfsd: Add use of pnfs exchange flags] >> Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com> >> [pnfsd: define a is_ds_only_session helper] >> Signed-off-by: Benny Halevy <bhalevy@panasas.com> >> Signed-off-by: Benny Halevy <bhalevy@primarydata.com> >> --- >> fs/nfsd/nfs4state.c | 4 ++++ >> include/uapi/linux/nfs4.h | 7 +++++++ >> 2 files changed, 11 insertions(+) >> >> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c >> index 21c15fc..2c973e6 100644 >> --- a/fs/nfsd/nfs4state.c >> +++ b/fs/nfsd/nfs4state.c >> @@ -1953,6 +1953,10 @@ static __be32 nfsd4_check_cb_sec(struct nfsd4_cb_sec *cbs) >> status = nfserr_seq_misordered; >> goto out_free_conn; >> } >> + >> + if (is_ds_only_session(unconf->cl_exchange_flags)) >> + cr_ses->flags &= ~SESSION4_BACK_CHAN; >> + >> old = find_confirmed_client_by_name(&unconf->cl_name, nn); >> if (old) { >> status = mark_client_expired(old); >> diff --git a/include/uapi/linux/nfs4.h b/include/uapi/linux/nfs4.h >> index 788128e..028f5fc 100644 >> --- a/include/uapi/linux/nfs4.h >> +++ b/include/uapi/linux/nfs4.h >> @@ -125,6 +125,13 @@ >> #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 >> #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 >> >> +static inline bool >> +is_ds_only_session(u32 exchange_flags) >> +{ >> + u32 mask = EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_PNFS_MDS; >> + return (exchange_flags & mask) == EXCHGID4_FLAG_USE_PNFS_DS; >> +} >> + >> #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 >> #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 >> /* >> -- >> 1.8.3.1 >> -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 21c15fc..2c973e6 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1953,6 +1953,10 @@ static __be32 nfsd4_check_cb_sec(struct nfsd4_cb_sec *cbs) status = nfserr_seq_misordered; goto out_free_conn; } + + if (is_ds_only_session(unconf->cl_exchange_flags)) + cr_ses->flags &= ~SESSION4_BACK_CHAN; + old = find_confirmed_client_by_name(&unconf->cl_name, nn); if (old) { status = mark_client_expired(old); diff --git a/include/uapi/linux/nfs4.h b/include/uapi/linux/nfs4.h index 788128e..028f5fc 100644 --- a/include/uapi/linux/nfs4.h +++ b/include/uapi/linux/nfs4.h @@ -125,6 +125,13 @@ #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 +static inline bool +is_ds_only_session(u32 exchange_flags) +{ + u32 mask = EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_PNFS_MDS; + return (exchange_flags & mask) == EXCHGID4_FLAG_USE_PNFS_DS; +} + #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 /*