Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110625
b: refs/heads/master
c: 73f6aa4
h: refs/heads/master
i:
  110623: 564e61b
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Oct 10, 2008
1 parent 7e2b1b6 commit ff5434d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 445e1ceda377a681c6f53595311b0d654ca21003
refs/heads/master: 73f6aa4d44ab6157badc456ddfa05b31e58de5f0
3 changes: 2 additions & 1 deletion trunk/fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,12 +1001,13 @@ xfs_buf_iodone_work(
* 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.
* need to check if the _XFS_BARRIER_FAILED flag was set 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;
bp->b_flags |= _XFS_BARRIER_FAILED;
xfs_buf_iorequest(bp);
} else if (bp->b_iodone)
(*(bp->b_iodone))(bp);
Expand Down
8 changes: 8 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ typedef enum {
* modifications being lost.
*/
_XBF_PAGE_LOCKED = (1 << 22),

/*
* If we try a barrier write, but it fails we have to communicate
* this to the upper layers. Unfortunately b_error gets overwritten
* when the buffer is re-issued so we have to add another flag to
* keep this information.
*/
_XFS_BARRIER_FAILED = (1 << 23),
} xfs_buf_flags_t;

typedef enum {
Expand Down
7 changes: 4 additions & 3 deletions trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,11 +1033,12 @@ xlog_iodone(xfs_buf_t *bp)
l = iclog->ic_log;

/*
* If the ordered flag has been removed by a lower
* layer, it means the underlyin device no longer supports
* If the _XFS_BARRIER_FAILED flag was set by a lower
* layer, it means the underlying device no longer supports
* barrier I/O. Warn loudly and turn off barriers.
*/
if ((l->l_mp->m_flags & XFS_MOUNT_BARRIER) && !XFS_BUF_ISORDERED(bp)) {
if (bp->b_flags & _XFS_BARRIER_FAILED) {
bp->b_flags &= ~_XFS_BARRIER_FAILED;
l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER;
xfs_fs_cmn_err(CE_WARN, l->l_mp,
"xlog_iodone: Barriers are no longer supported"
Expand Down

0 comments on commit ff5434d

Please sign in to comment.