diff options
author | Dave Chinner <david@fromorbit.com> | 2016-05-20 10:33:38 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-05-20 10:33:38 +1000 |
commit | 544ad71fc8e20fb3a6f50f00d487751492cd8409 (patch) | |
tree | 6e9ca14b67f65e059b8095cc4fd30645b408b4ae /fs/xfs/xfs_buf.h | |
parent | 2a4ad5894c819978dca5595396d54d51c3aca694 (diff) | |
parent | e6b3bb78962e65c4ad125598755cfbf2a8779e86 (diff) | |
download | linux-544ad71fc8e20fb3a6f50f00d487751492cd8409.tar.bz2 |
Merge branch 'xfs-4.7-error-cfg' into for-next
Diffstat (limited to 'fs/xfs/xfs_buf.h')
-rw-r--r-- | fs/xfs/xfs_buf.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index 4eb89bd4ee73..8bfb974f0772 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -183,6 +183,26 @@ typedef struct xfs_buf { unsigned int b_page_count; /* size of page array */ unsigned int b_offset; /* page offset in first page */ int b_error; /* error code on I/O */ + + /* + * async write failure retry count. Initialised to zero on the first + * failure, then when it exceeds the maximum configured without a + * success the write is considered to be failed permanently and the + * iodone handler will take appropriate action. + * + * For retry timeouts, we record the jiffie of the first failure. This + * means that we can change the retry timeout for buffers already under + * I/O and thus avoid getting stuck in a retry loop with a long timeout. + * + * last_error is used to ensure that we are getting repeated errors, not + * different errors. e.g. a block device might change ENOSPC to EIO when + * a failure timeout occurs, so we want to re-initialise the error + * retry behaviour appropriately when that happens. + */ + int b_retries; + unsigned long b_first_retry_time; /* in jiffies */ + int b_last_error; + const struct xfs_buf_ops *b_ops; #ifdef XFS_BUF_LOCK_TRACKING |