Re: [PATCH v2 2/3] NFSv4.1: Always clear the NFS_INO_LAYOUTCOMMIT in layoutreturn

Peng Tao
2013-03-21T17:13:22Z

On Thu, Mar 21, 2013 at 10:13:00AM -0400, Trond Myklebust wrote:
<snip>
> @@ -1458,7 +1479,6 @@ static void pnfs_ld_handle_write_error(struct nfs_write_data *data)
> dprintk("pnfs write error = %d\n", hdr->pnfs_error);
> if (NFS_SERVER(hdr->inode)->pnfs_curr_ld->flags &
> PNFS_LAYOUTRET_ON_ERROR) {
> - clear_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(hdr->inode)->flags);
Hi Trond and Boaz,

If object layout requires layout being committed before returned (as fixed in
the 3/3 patch), is it a potential problem to directly return layout here as
well? e.g., if one lseg is successfully written and pending layoutcommit,
then another lseg of the same file failed read/write, then layout will be
returned w/o layoutcommit. For blocklayout, it is a potential data corruption
and that's why block layout doesn't set PNFS_LAYOUTRET_ON_ERROR bit. So
I'm wondering if object will suffer from the same issue?

Thanks,
Tao

--
Here lieth one whos name was writ on water.