tree: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next head: d06e05e33f03ccd9dc7e8322a42df1afce54be52 commit: df1024df0c749ae3350f3dec4d6be8e2dc344e4c [20/21] NFSv4: Always clear the pNFS layout when handling ESTALE config: sparc64-allyesconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout df1024df0c749ae3350f3dec4d6be8e2dc344e4c # save the attached .config to linux build tree make.cross ARCH=sparc64 All errors (new ones prefixed by >>): fs//nfs/nfs42proc.c: In function 'nfs42_layoutstat_done': >> fs//nfs/nfs42proc.c:375:2: error: duplicate case value case -ESTALE: ^~~~ fs//nfs/nfs42proc.c:374:2: note: previously used here case -NFS4ERR_STALE: ^~~~ vim +375 fs//nfs/nfs42proc.c 359 360 static void 361 nfs42_layoutstat_done(struct rpc_task *task, void *calldata) 362 { 363 struct nfs42_layoutstat_data *data = calldata; 364 struct inode *inode = data->inode; 365 struct pnfs_layout_hdr *lo; 366 367 if (!nfs4_sequence_done(task, &data->res.seq_res)) 368 return; 369 370 switch (task->tk_status) { 371 case 0: 372 break; 373 case -NFS4ERR_BADHANDLE: 374 case -NFS4ERR_STALE: > 375 case -ESTALE: 376 pnfs_destroy_layout(NFS_I(inode)); 377 break; 378 case -NFS4ERR_EXPIRED: 379 case -NFS4ERR_ADMIN_REVOKED: 380 case -NFS4ERR_DELEG_REVOKED: 381 case -NFS4ERR_STALE_STATEID: 382 case -NFS4ERR_BAD_STATEID: 383 spin_lock(&inode->i_lock); 384 lo = NFS_I(inode)->layout; 385 if (pnfs_layout_is_valid(lo) && 386 nfs4_stateid_match(&data->args.stateid, 387 &lo->plh_stateid)) { 388 LIST_HEAD(head); 389 390 /* 391 * Mark the bad layout state as invalid, then retry 392 * with the current stateid. 393 */ 394 pnfs_mark_layout_stateid_invalid(lo, &head); 395 spin_unlock(&inode->i_lock); 396 pnfs_free_lseg_list(&head); 397 nfs_commit_inode(inode, 0); 398 } else 399 spin_unlock(&inode->i_lock); 400 break; 401 case -NFS4ERR_OLD_STATEID: 402 spin_lock(&inode->i_lock); 403 lo = NFS_I(inode)->layout; 404 if (pnfs_layout_is_valid(lo) && 405 nfs4_stateid_match_other(&data->args.stateid, 406 &lo->plh_stateid)) { 407 /* Do we need to delay before resending? */ 408 if (!nfs4_stateid_is_newer(&lo->plh_stateid, 409 &data->args.stateid)) 410 rpc_delay(task, HZ); 411 rpc_restart_call_prepare(task); 412 } 413 spin_unlock(&inode->i_lock); 414 break; 415 case -ENOTSUPP: 416 case -EOPNOTSUPP: 417 NFS_SERVER(inode)->caps &= ~NFS_CAP_LAYOUTSTATS; 418 } 419 } 420 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip