Thank you for your tips, I will try it down. regards Su Hua <suhua.tanke@xxxxxxxxx> 于2019年2月21日周四 上午10:54写道: > > Hi Carlos > I am using the kernel version 4.4.163. There is a problem that umount is in the D state after the disk is unplugged. This problem was solved after version 4.7. Now that we have not upgraded the kernel version, I want to try backport on this 4.4.163 first. I added these two patches separately. But there are still problems, can you still recall where i need to change? > patch: > e6b3bb78962e6 ("xfs: add "fail at unmount" error handling configuration") > 9356413 Release buffer locks in case of IO error > > This is the information I used to communicate with Brian. > https://www.spinics.net/lists/linux-xfs/msg24740.html > > problem: > ... > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > Feb 20 18:07:56 node-1 kernel: XFS (sdc): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5. > ... > > This is where I modified according to the second patch. > 440 /* > 441 * Someone else is already flushing the inode. Nothing we can do > 442 * here but wait for the flush to finish and remove the item from > 443 * the AIL. > 444 */ > 445 if (!xfs_iflock_nowait(ip)) { > 446 > 447 if (lip->li_mountp->m_flags & XFS_MOUNT_UNMOUNTING) { > 448 int error; > 449 struct xfs_dinode *dip; > 450 > 451 error = xfs_imap_to_bp(ip->i_mount, NULL, &ip->i_imap, &dip, > 452 &bp, XBF_TRYLOCK, 0); > 453 if (error) { > 454 rval = XFS_ITEM_FLUSHING; > 455 goto out_unlock; > 456 } > 457 > 458 if (!(bp->b_flags & XBF_WRITE_FAIL)) { > 459 rval = XFS_ITEM_FLUSHING; > 460 xfs_buf_relse(bp); > 461 goto out_unlock; > 462 } > 463 > 464 if (!xfs_buf_delwri_queue(bp, buffer_list)) > 465 rval = XFS_ITEM_FLUSHING; > 466 > 467 xfs_buf_relse(bp); > 468 } else > 469 rval = XFS_ITEM_FLUSHING; > 470 goto out_unlock; > 471 } > > regards > su > >