----- Original Message ----- > From: "Christoph Hellwig" <hch@xxxxxxxxxxxxx> > To: "Tigran Mkrtchyan" <tigran.mkrtchyan@xxxxxxx> > Cc: "Trond Myklebust" <trond.myklebust@xxxxxxxxxxxxxxx>, linux-nfs@xxxxxxxxxxxxxxx > Sent: Wednesday, March 2, 2016 5:37:46 PM > Subject: Re: [PATCH] pnfs support servers with multiple layout types >> + for(i = 0; i < num && i < NFS_MAX_LAYOUT_TYPES; i++) >> + layouttype[i] = be32_to_cpup(p++); > > Can we use a bitmap and do something like > > layouttype |= (1 << be32_to_cpup(p++)); > Sorry, took me a bit longer to understand what you actually was saying. But still won't work, as we will loose the order of supported layouts. To make it working, we can add a mount option for preferred layout: mount -o preferred_layout=nfs4_file,vers=4.1 .... Then client will try preferred first, and if it's not provided, then will go through the bitmask and pick first working. Shall I do that? Trond, any comments? Tigran. > that's what I did for my unsubmitted patches to submit multiple > layouttypes in the Linux server.. > -- > 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 -- 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