|
@@ -997,7 +997,18 @@ xfs_buf_iodone_work(
|
|
xfs_buf_t *bp =
|
|
xfs_buf_t *bp =
|
|
container_of(work, xfs_buf_t, b_iodone_work);
|
|
container_of(work, xfs_buf_t, b_iodone_work);
|
|
|
|
|
|
- if (bp->b_iodone)
|
|
|
|
|
|
+ /*
|
|
|
|
+ * We can get an EOPNOTSUPP to ordered writes. Here we clear the
|
|
|
|
+ * ordered flag and reissue them. Because we can't tell the higher
|
|
|
|
+ * layers directly that they should not issue ordered I/O anymore, they
|
|
|
|
+ * need to check if the ordered flag was cleared during I/O completion.
|
|
|
|
+ */
|
|
|
|
+ if ((bp->b_error == EOPNOTSUPP) &&
|
|
|
|
+ (bp->b_flags & (XBF_ORDERED|XBF_ASYNC)) == (XBF_ORDERED|XBF_ASYNC)) {
|
|
|
|
+ XB_TRACE(bp, "ordered_retry", bp->b_iodone);
|
|
|
|
+ bp->b_flags &= ~XBF_ORDERED;
|
|
|
|
+ xfs_buf_iorequest(bp);
|
|
|
|
+ } else if (bp->b_iodone)
|
|
(*(bp->b_iodone))(bp);
|
|
(*(bp->b_iodone))(bp);
|
|
else if (bp->b_flags & XBF_ASYNC)
|
|
else if (bp->b_flags & XBF_ASYNC)
|
|
xfs_buf_relse(bp);
|
|
xfs_buf_relse(bp);
|