diff options
author | Dave Chinner <david@fromorbit.com> | 2016-12-09 00:56:26 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-12-09 00:56:26 -0500 |
commit | 9807b773dad4555665931d57065d7f8adab58e0f (patch) | |
tree | 1475442200af6def0e03a792311dff151ef9f331 | |
parent | a444d72e609062a040ed95a50e8fccfa1d58281b (diff) | |
parent | 9875258ca7ab238a08bb9ad17e0c9b9984eac7df (diff) |
Merge branch 'xfs-4.10-misc-fixes-4' into for-next
-rw-r--r-- | Documentation/filesystems/xfs.txt | 12 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc_btree.c | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_attr_leaf.c | 8 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap_btree.c | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_buf.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_file.c | 29 | ||||
-rw-r--r-- | fs/xfs/xfs_iops.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log.c | 39 | ||||
-rw-r--r-- | fs/xfs/xfs_super.c | 25 | ||||
-rw-r--r-- | fs/xfs/xfs_trace.h | 109 |
11 files changed, 60 insertions, 173 deletions
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index c2d44e6e117b..3b9b5c149f32 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
@@ -51,13 +51,6 @@ default behaviour. | |||
51 | CRC enabled filesystems always use the attr2 format, and so | 51 | CRC enabled filesystems always use the attr2 format, and so |
52 | will reject the noattr2 mount option if it is set. | 52 | will reject the noattr2 mount option if it is set. |
53 | 53 | ||
54 | barrier (*) | ||
55 | nobarrier | ||
56 | Enables/disables the use of block layer write barriers for | ||
57 | writes into the journal and for data integrity operations. | ||
58 | This allows for drive level write caching to be enabled, for | ||
59 | devices that support write barriers. | ||
60 | |||
61 | discard | 54 | discard |
62 | nodiscard (*) | 55 | nodiscard (*) |
63 | Enable/disable the issuing of commands to let the block | 56 | Enable/disable the issuing of commands to let the block |
@@ -228,7 +221,10 @@ default behaviour. | |||
228 | Deprecated Mount Options | 221 | Deprecated Mount Options |
229 | ======================== | 222 | ======================== |
230 | 223 | ||
231 | None at present. | 224 | Name Removal Schedule |
225 | ---- ---------------- | ||
226 | barrier no earlier than v4.15 | ||
227 | nobarrier no earlier than v4.15 | ||
232 | 228 | ||
233 | 229 | ||
234 | Removed Mount Options | 230 | Removed Mount Options |
diff --git a/fs/xfs/libxfs/xfs_alloc_btree.c b/fs/xfs/libxfs/xfs_alloc_btree.c index 44cfcd03c451..efb467b10a71 100644 --- a/fs/xfs/libxfs/xfs_alloc_btree.c +++ b/fs/xfs/libxfs/xfs_alloc_btree.c | |||
@@ -421,7 +421,7 @@ xfs_allocbt_init_cursor( | |||
421 | 421 | ||
422 | ASSERT(btnum == XFS_BTNUM_BNO || btnum == XFS_BTNUM_CNT); | 422 | ASSERT(btnum == XFS_BTNUM_BNO || btnum == XFS_BTNUM_CNT); |
423 | 423 | ||
424 | cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP); | 424 | cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS); |
425 | 425 | ||
426 | cur->bc_tp = tp; | 426 | cur->bc_tp = tp; |
427 | cur->bc_mp = mp; | 427 | cur->bc_mp = mp; |
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c index 8ea91f363093..2852521fc8ec 100644 --- a/fs/xfs/libxfs/xfs_attr_leaf.c +++ b/fs/xfs/libxfs/xfs_attr_leaf.c | |||
@@ -253,6 +253,7 @@ xfs_attr3_leaf_verify( | |||
253 | { | 253 | { |
254 | struct xfs_mount *mp = bp->b_target->bt_mount; | 254 | struct xfs_mount *mp = bp->b_target->bt_mount; |
255 | struct xfs_attr_leafblock *leaf = bp->b_addr; | 255 | struct xfs_attr_leafblock *leaf = bp->b_addr; |
256 | struct xfs_perag *pag = bp->b_pag; | ||
256 | struct xfs_attr3_icleaf_hdr ichdr; | 257 | struct xfs_attr3_icleaf_hdr ichdr; |
257 | 258 | ||
258 | xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf); | 259 | xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf); |
@@ -273,7 +274,12 @@ xfs_attr3_leaf_verify( | |||
273 | if (ichdr.magic != XFS_ATTR_LEAF_MAGIC) | 274 | if (ichdr.magic != XFS_ATTR_LEAF_MAGIC) |
274 | return false; | 275 | return false; |
275 | } | 276 | } |
276 | if (ichdr.count == 0) | 277 | /* |
278 | * In recovery there is a transient state where count == 0 is valid | ||
279 | * because we may have transitioned an empty shortform attr to a leaf | ||
280 | * if the attr didn't fit in shortform. | ||
281 | */ | ||
282 | if (pag && pag->pagf_init && ichdr.count == 0) | ||
277 | return false; | 283 | return false; |
278 | 284 | ||
279 | /* XXX: need to range check rest of attr header values */ | 285 | /* XXX: need to range check rest of attr header values */ |
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c index 94ad31d372ab..d6330c297ca0 100644 --- a/fs/xfs/libxfs/xfs_bmap_btree.c +++ b/fs/xfs/libxfs/xfs_bmap_btree.c | |||
@@ -796,7 +796,7 @@ xfs_bmbt_init_cursor( | |||
796 | struct xfs_btree_cur *cur; | 796 | struct xfs_btree_cur *cur; |
797 | ASSERT(whichfork != XFS_COW_FORK); | 797 | ASSERT(whichfork != XFS_COW_FORK); |
798 | 798 | ||
799 | cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP); | 799 | cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS); |
800 | 800 | ||
801 | cur->bc_tp = tp; | 801 | cur->bc_tp = tp; |
802 | cur->bc_mp = mp; | 802 | cur->bc_mp = mp; |
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index e7ff8ef0e5a7..0fd086d03d41 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c | |||
@@ -357,7 +357,7 @@ xfs_inobt_init_cursor( | |||
357 | struct xfs_agi *agi = XFS_BUF_TO_AGI(agbp); | 357 | struct xfs_agi *agi = XFS_BUF_TO_AGI(agbp); |
358 | struct xfs_btree_cur *cur; | 358 | struct xfs_btree_cur *cur; |
359 | 359 | ||
360 | cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP); | 360 | cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS); |
361 | 361 | ||
362 | cur->bc_tp = tp; | 362 | cur->bc_tp = tp; |
363 | cur->bc_mp = mp; | 363 | cur->bc_mp = mp; |
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 516109424c96..509dd6cc1331 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -1737,8 +1737,7 @@ xfs_free_buftarg( | |||
1737 | percpu_counter_destroy(&btp->bt_io_count); | 1737 | percpu_counter_destroy(&btp->bt_io_count); |
1738 | list_lru_destroy(&btp->bt_lru); | 1738 | list_lru_destroy(&btp->bt_lru); |
1739 | 1739 | ||
1740 | if (mp->m_flags & XFS_MOUNT_BARRIER) | 1740 | xfs_blkdev_issue_flush(btp); |
1741 | xfs_blkdev_issue_flush(btp); | ||
1742 | 1741 | ||
1743 | kmem_free(btp); | 1742 | kmem_free(btp); |
1744 | } | 1743 | } |
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index b837ad8a63e4..65d27a502909 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -149,19 +149,16 @@ xfs_file_fsync( | |||
149 | 149 | ||
150 | xfs_iflags_clear(ip, XFS_ITRUNCATED); | 150 | xfs_iflags_clear(ip, XFS_ITRUNCATED); |
151 | 151 | ||
152 | if (mp->m_flags & XFS_MOUNT_BARRIER) { | 152 | /* |
153 | /* | 153 | * If we have an RT and/or log subvolume we need to make sure to flush |
154 | * If we have an RT and/or log subvolume we need to make sure | 154 | * the write cache the device used for file data first. This is to |
155 | * to flush the write cache the device used for file data | 155 | * ensure newly written file data make it to disk before logging the new |
156 | * first. This is to ensure newly written file data make | 156 | * inode size in case of an extending write. |
157 | * it to disk before logging the new inode size in case of | 157 | */ |
158 | * an extending write. | 158 | if (XFS_IS_REALTIME_INODE(ip)) |
159 | */ | 159 | xfs_blkdev_issue_flush(mp->m_rtdev_targp); |
160 | if (XFS_IS_REALTIME_INODE(ip)) | 160 | else if (mp->m_logdev_targp != mp->m_ddev_targp) |
161 | xfs_blkdev_issue_flush(mp->m_rtdev_targp); | 161 | xfs_blkdev_issue_flush(mp->m_ddev_targp); |
162 | else if (mp->m_logdev_targp != mp->m_ddev_targp) | ||
163 | xfs_blkdev_issue_flush(mp->m_ddev_targp); | ||
164 | } | ||
165 | 162 | ||
166 | /* | 163 | /* |
167 | * All metadata updates are logged, which means that we just have to | 164 | * All metadata updates are logged, which means that we just have to |
@@ -196,10 +193,8 @@ xfs_file_fsync( | |||
196 | * an already allocated file and thus do not have any metadata to | 193 | * an already allocated file and thus do not have any metadata to |
197 | * commit. | 194 | * commit. |
198 | */ | 195 | */ |
199 | if ((mp->m_flags & XFS_MOUNT_BARRIER) && | 196 | if (!log_flushed && !XFS_IS_REALTIME_INODE(ip) && |
200 | mp->m_logdev_targp == mp->m_ddev_targp && | 197 | mp->m_logdev_targp == mp->m_ddev_targp) |
201 | !XFS_IS_REALTIME_INODE(ip) && | ||
202 | !log_flushed) | ||
203 | xfs_blkdev_issue_flush(mp->m_ddev_targp); | 198 | xfs_blkdev_issue_flush(mp->m_ddev_targp); |
204 | 199 | ||
205 | return error; | 200 | return error; |
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index c962999a87ab..b930be0b1596 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c | |||
@@ -988,7 +988,7 @@ xfs_vn_setattr( | |||
988 | return error; | 988 | return error; |
989 | 989 | ||
990 | xfs_ilock(ip, XFS_MMAPLOCK_EXCL); | 990 | xfs_ilock(ip, XFS_MMAPLOCK_EXCL); |
991 | error = xfs_setattr_size(ip, iattr); | 991 | error = xfs_vn_setattr_size(dentry, iattr); |
992 | xfs_iunlock(ip, XFS_MMAPLOCK_EXCL); | 992 | xfs_iunlock(ip, XFS_MMAPLOCK_EXCL); |
993 | } else { | 993 | } else { |
994 | error = xfs_vn_setattr_nonsize(dentry, iattr); | 994 | error = xfs_vn_setattr_nonsize(dentry, iattr); |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 3ebe444eb60f..c39ac14ff540 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1862,26 +1862,21 @@ xlog_sync( | |||
1862 | 1862 | ||
1863 | bp->b_io_length = BTOBB(count); | 1863 | bp->b_io_length = BTOBB(count); |
1864 | bp->b_fspriv = iclog; | 1864 | bp->b_fspriv = iclog; |
1865 | bp->b_flags &= ~(XBF_FUA | XBF_FLUSH); | 1865 | bp->b_flags &= ~XBF_FLUSH; |
1866 | bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO | XBF_WRITE); | 1866 | bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO | XBF_WRITE | XBF_FUA); |
1867 | 1867 | ||
1868 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) { | 1868 | /* |
1869 | bp->b_flags |= XBF_FUA; | 1869 | * Flush the data device before flushing the log to make sure all meta |
1870 | 1870 | * data written back from the AIL actually made it to disk before | |
1871 | /* | 1871 | * stamping the new log tail LSN into the log buffer. For an external |
1872 | * Flush the data device before flushing the log to make | 1872 | * log we need to issue the flush explicitly, and unfortunately |
1873 | * sure all meta data written back from the AIL actually made | 1873 | * synchronously here; for an internal log we can simply use the block |
1874 | * it to disk before stamping the new log tail LSN into the | 1874 | * layer state machine for preflushes. |
1875 | * log buffer. For an external log we need to issue the | 1875 | */ |
1876 | * flush explicitly, and unfortunately synchronously here; | 1876 | if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp) |
1877 | * for an internal log we can simply use the block layer | 1877 | xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); |
1878 | * state machine for preflushes. | 1878 | else |
1879 | */ | 1879 | bp->b_flags |= XBF_FLUSH; |
1880 | if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp) | ||
1881 | xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); | ||
1882 | else | ||
1883 | bp->b_flags |= XBF_FLUSH; | ||
1884 | } | ||
1885 | 1880 | ||
1886 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); | 1881 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); |
1887 | ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); | 1882 | ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); |
@@ -1906,10 +1901,8 @@ xlog_sync( | |||
1906 | xfs_buf_associate_memory(bp, | 1901 | xfs_buf_associate_memory(bp, |
1907 | (char *)&iclog->ic_header + count, split); | 1902 | (char *)&iclog->ic_header + count, split); |
1908 | bp->b_fspriv = iclog; | 1903 | bp->b_fspriv = iclog; |
1909 | bp->b_flags &= ~(XBF_FUA | XBF_FLUSH); | 1904 | bp->b_flags &= ~XBF_FLUSH; |
1910 | bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO | XBF_WRITE); | 1905 | bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO | XBF_WRITE | XBF_FUA); |
1911 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) | ||
1912 | bp->b_flags |= XBF_FUA; | ||
1913 | 1906 | ||
1914 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); | 1907 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); |
1915 | ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); | 1908 | ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); |
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 563d1d146b8c..eecbaac08eba 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -104,9 +104,6 @@ static const match_table_t tokens = { | |||
104 | {Opt_sysvgroups,"sysvgroups"}, /* group-ID from current process */ | 104 | {Opt_sysvgroups,"sysvgroups"}, /* group-ID from current process */ |
105 | {Opt_allocsize, "allocsize=%s"},/* preferred allocation size */ | 105 | {Opt_allocsize, "allocsize=%s"},/* preferred allocation size */ |
106 | {Opt_norecovery,"norecovery"}, /* don't run XFS recovery */ | 106 | {Opt_norecovery,"norecovery"}, /* don't run XFS recovery */ |
107 | {Opt_barrier, "barrier"}, /* use writer barriers for log write and | ||
108 | * unwritten extent conversion */ | ||
109 | {Opt_nobarrier, "nobarrier"}, /* .. disable */ | ||
110 | {Opt_inode64, "inode64"}, /* inodes can be allocated anywhere */ | 107 | {Opt_inode64, "inode64"}, /* inodes can be allocated anywhere */ |
111 | {Opt_inode32, "inode32"}, /* inode allocation limited to | 108 | {Opt_inode32, "inode32"}, /* inode allocation limited to |
112 | * XFS_MAXINUMBER_32 */ | 109 | * XFS_MAXINUMBER_32 */ |
@@ -134,6 +131,12 @@ static const match_table_t tokens = { | |||
134 | {Opt_nodiscard, "nodiscard"}, /* Do not discard unused blocks */ | 131 | {Opt_nodiscard, "nodiscard"}, /* Do not discard unused blocks */ |
135 | 132 | ||
136 | {Opt_dax, "dax"}, /* Enable direct access to bdev pages */ | 133 | {Opt_dax, "dax"}, /* Enable direct access to bdev pages */ |
134 | |||
135 | /* Deprecated mount options scheduled for removal */ | ||
136 | {Opt_barrier, "barrier"}, /* use writer barriers for log write and | ||
137 | * unwritten extent conversion */ | ||
138 | {Opt_nobarrier, "nobarrier"}, /* .. disable */ | ||
139 | |||
137 | {Opt_err, NULL}, | 140 | {Opt_err, NULL}, |
138 | }; | 141 | }; |
139 | 142 | ||
@@ -301,12 +304,6 @@ xfs_parseargs( | |||
301 | case Opt_nouuid: | 304 | case Opt_nouuid: |
302 | mp->m_flags |= XFS_MOUNT_NOUUID; | 305 | mp->m_flags |= XFS_MOUNT_NOUUID; |
303 | break; | 306 | break; |
304 | case Opt_barrier: | ||
305 | mp->m_flags |= XFS_MOUNT_BARRIER; | ||
306 | break; | ||
307 | case Opt_nobarrier: | ||
308 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | ||
309 | break; | ||
310 | case Opt_ikeep: | 307 | case Opt_ikeep: |
311 | mp->m_flags |= XFS_MOUNT_IKEEP; | 308 | mp->m_flags |= XFS_MOUNT_IKEEP; |
312 | break; | 309 | break; |
@@ -374,6 +371,14 @@ xfs_parseargs( | |||
374 | mp->m_flags |= XFS_MOUNT_DAX; | 371 | mp->m_flags |= XFS_MOUNT_DAX; |
375 | break; | 372 | break; |
376 | #endif | 373 | #endif |
374 | case Opt_barrier: | ||
375 | xfs_warn(mp, "%s option is deprecated, ignoring.", p); | ||
376 | mp->m_flags |= XFS_MOUNT_BARRIER; | ||
377 | break; | ||
378 | case Opt_nobarrier: | ||
379 | xfs_warn(mp, "%s option is deprecated, ignoring.", p); | ||
380 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | ||
381 | break; | ||
377 | default: | 382 | default: |
378 | xfs_warn(mp, "unknown mount option [%s].", p); | 383 | xfs_warn(mp, "unknown mount option [%s].", p); |
379 | return -EINVAL; | 384 | return -EINVAL; |
@@ -1238,9 +1243,11 @@ xfs_fs_remount( | |||
1238 | token = match_token(p, tokens, args); | 1243 | token = match_token(p, tokens, args); |
1239 | switch (token) { | 1244 | switch (token) { |
1240 | case Opt_barrier: | 1245 | case Opt_barrier: |
1246 | xfs_warn(mp, "%s option is deprecated, ignoring.", p); | ||
1241 | mp->m_flags |= XFS_MOUNT_BARRIER; | 1247 | mp->m_flags |= XFS_MOUNT_BARRIER; |
1242 | break; | 1248 | break; |
1243 | case Opt_nobarrier: | 1249 | case Opt_nobarrier: |
1250 | xfs_warn(mp, "%s option is deprecated, ignoring.", p); | ||
1244 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | 1251 | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
1245 | break; | 1252 | break; |
1246 | case Opt_inode64: | 1253 | case Opt_inode64: |
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 0907752be62d..69c5bcd9a51b 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -355,7 +355,6 @@ DEFINE_BUF_EVENT(xfs_buf_rele); | |||
355 | DEFINE_BUF_EVENT(xfs_buf_iodone); | 355 | DEFINE_BUF_EVENT(xfs_buf_iodone); |
356 | DEFINE_BUF_EVENT(xfs_buf_submit); | 356 | DEFINE_BUF_EVENT(xfs_buf_submit); |
357 | DEFINE_BUF_EVENT(xfs_buf_submit_wait); | 357 | DEFINE_BUF_EVENT(xfs_buf_submit_wait); |
358 | DEFINE_BUF_EVENT(xfs_buf_bawrite); | ||
359 | DEFINE_BUF_EVENT(xfs_buf_lock); | 358 | DEFINE_BUF_EVENT(xfs_buf_lock); |
360 | DEFINE_BUF_EVENT(xfs_buf_lock_done); | 359 | DEFINE_BUF_EVENT(xfs_buf_lock_done); |
361 | DEFINE_BUF_EVENT(xfs_buf_trylock_fail); | 360 | DEFINE_BUF_EVENT(xfs_buf_trylock_fail); |
@@ -367,19 +366,15 @@ DEFINE_BUF_EVENT(xfs_buf_delwri_queue); | |||
367 | DEFINE_BUF_EVENT(xfs_buf_delwri_queued); | 366 | DEFINE_BUF_EVENT(xfs_buf_delwri_queued); |
368 | DEFINE_BUF_EVENT(xfs_buf_delwri_split); | 367 | DEFINE_BUF_EVENT(xfs_buf_delwri_split); |
369 | DEFINE_BUF_EVENT(xfs_buf_get_uncached); | 368 | DEFINE_BUF_EVENT(xfs_buf_get_uncached); |
370 | DEFINE_BUF_EVENT(xfs_bdstrat_shut); | ||
371 | DEFINE_BUF_EVENT(xfs_buf_item_relse); | 369 | DEFINE_BUF_EVENT(xfs_buf_item_relse); |
372 | DEFINE_BUF_EVENT(xfs_buf_item_iodone_async); | 370 | DEFINE_BUF_EVENT(xfs_buf_item_iodone_async); |
373 | DEFINE_BUF_EVENT(xfs_buf_error_relse); | 371 | DEFINE_BUF_EVENT(xfs_buf_error_relse); |
374 | DEFINE_BUF_EVENT(xfs_buf_wait_buftarg); | 372 | DEFINE_BUF_EVENT(xfs_buf_wait_buftarg); |
375 | DEFINE_BUF_EVENT(xfs_trans_read_buf_io); | ||
376 | DEFINE_BUF_EVENT(xfs_trans_read_buf_shut); | 373 | DEFINE_BUF_EVENT(xfs_trans_read_buf_shut); |
377 | 374 | ||
378 | /* not really buffer traces, but the buf provides useful information */ | 375 | /* not really buffer traces, but the buf provides useful information */ |
379 | DEFINE_BUF_EVENT(xfs_btree_corrupt); | 376 | DEFINE_BUF_EVENT(xfs_btree_corrupt); |
380 | DEFINE_BUF_EVENT(xfs_da_btree_corrupt); | ||
381 | DEFINE_BUF_EVENT(xfs_reset_dqcounts); | 377 | DEFINE_BUF_EVENT(xfs_reset_dqcounts); |
382 | DEFINE_BUF_EVENT(xfs_inode_item_push); | ||
383 | 378 | ||
384 | /* pass flags explicitly */ | 379 | /* pass flags explicitly */ |
385 | DECLARE_EVENT_CLASS(xfs_buf_flags_class, | 380 | DECLARE_EVENT_CLASS(xfs_buf_flags_class, |
@@ -541,7 +536,6 @@ DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin); | |||
541 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold); | 536 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold); |
542 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release); | 537 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release); |
543 | DEFINE_BUF_ITEM_EVENT(xfs_trans_binval); | 538 | DEFINE_BUF_ITEM_EVENT(xfs_trans_binval); |
544 | DEFINE_BUF_ITEM_EVENT(xfs_trans_buf_ordered); | ||
545 | 539 | ||
546 | DECLARE_EVENT_CLASS(xfs_filestream_class, | 540 | DECLARE_EVENT_CLASS(xfs_filestream_class, |
547 | TP_PROTO(struct xfs_inode *ip, xfs_agnumber_t agno), | 541 | TP_PROTO(struct xfs_inode *ip, xfs_agnumber_t agno), |
@@ -680,7 +674,6 @@ DEFINE_INODE_EVENT(xfs_ioctl_setattr); | |||
680 | DEFINE_INODE_EVENT(xfs_dir_fsync); | 674 | DEFINE_INODE_EVENT(xfs_dir_fsync); |
681 | DEFINE_INODE_EVENT(xfs_file_fsync); | 675 | DEFINE_INODE_EVENT(xfs_file_fsync); |
682 | DEFINE_INODE_EVENT(xfs_destroy_inode); | 676 | DEFINE_INODE_EVENT(xfs_destroy_inode); |
683 | DEFINE_INODE_EVENT(xfs_evict_inode); | ||
684 | DEFINE_INODE_EVENT(xfs_update_time); | 677 | DEFINE_INODE_EVENT(xfs_update_time); |
685 | 678 | ||
686 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); | 679 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); |
@@ -798,7 +791,6 @@ TRACE_EVENT(xfs_irec_merge_post, | |||
798 | DEFINE_EVENT(xfs_iref_class, name, \ | 791 | DEFINE_EVENT(xfs_iref_class, name, \ |
799 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \ | 792 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \ |
800 | TP_ARGS(ip, caller_ip)) | 793 | TP_ARGS(ip, caller_ip)) |
801 | DEFINE_IREF_EVENT(xfs_ihold); | ||
802 | DEFINE_IREF_EVENT(xfs_irele); | 794 | DEFINE_IREF_EVENT(xfs_irele); |
803 | DEFINE_IREF_EVENT(xfs_inode_pin); | 795 | DEFINE_IREF_EVENT(xfs_inode_pin); |
804 | DEFINE_IREF_EVENT(xfs_inode_unpin); | 796 | DEFINE_IREF_EVENT(xfs_inode_unpin); |
@@ -939,7 +931,6 @@ DEFINE_DQUOT_EVENT(xfs_dqget_miss); | |||
939 | DEFINE_DQUOT_EVENT(xfs_dqget_freeing); | 931 | DEFINE_DQUOT_EVENT(xfs_dqget_freeing); |
940 | DEFINE_DQUOT_EVENT(xfs_dqget_dup); | 932 | DEFINE_DQUOT_EVENT(xfs_dqget_dup); |
941 | DEFINE_DQUOT_EVENT(xfs_dqput); | 933 | DEFINE_DQUOT_EVENT(xfs_dqput); |
942 | DEFINE_DQUOT_EVENT(xfs_dqput_wait); | ||
943 | DEFINE_DQUOT_EVENT(xfs_dqput_free); | 934 | DEFINE_DQUOT_EVENT(xfs_dqput_free); |
944 | DEFINE_DQUOT_EVENT(xfs_dqrele); | 935 | DEFINE_DQUOT_EVENT(xfs_dqrele); |
945 | DEFINE_DQUOT_EVENT(xfs_dqflush); | 936 | DEFINE_DQUOT_EVENT(xfs_dqflush); |
@@ -1815,7 +1806,6 @@ DEFINE_ATTR_EVENT(xfs_attr_sf_addname); | |||
1815 | DEFINE_ATTR_EVENT(xfs_attr_sf_create); | 1806 | DEFINE_ATTR_EVENT(xfs_attr_sf_create); |
1816 | DEFINE_ATTR_EVENT(xfs_attr_sf_lookup); | 1807 | DEFINE_ATTR_EVENT(xfs_attr_sf_lookup); |
1817 | DEFINE_ATTR_EVENT(xfs_attr_sf_remove); | 1808 | DEFINE_ATTR_EVENT(xfs_attr_sf_remove); |
1818 | DEFINE_ATTR_EVENT(xfs_attr_sf_removename); | ||
1819 | DEFINE_ATTR_EVENT(xfs_attr_sf_to_leaf); | 1809 | DEFINE_ATTR_EVENT(xfs_attr_sf_to_leaf); |
1820 | 1810 | ||
1821 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add); | 1811 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add); |
@@ -1844,7 +1834,6 @@ DEFINE_ATTR_EVENT(xfs_attr_leaf_toosmall); | |||
1844 | 1834 | ||
1845 | DEFINE_ATTR_EVENT(xfs_attr_node_addname); | 1835 | DEFINE_ATTR_EVENT(xfs_attr_node_addname); |
1846 | DEFINE_ATTR_EVENT(xfs_attr_node_get); | 1836 | DEFINE_ATTR_EVENT(xfs_attr_node_get); |
1847 | DEFINE_ATTR_EVENT(xfs_attr_node_lookup); | ||
1848 | DEFINE_ATTR_EVENT(xfs_attr_node_replace); | 1837 | DEFINE_ATTR_EVENT(xfs_attr_node_replace); |
1849 | DEFINE_ATTR_EVENT(xfs_attr_node_removename); | 1838 | DEFINE_ATTR_EVENT(xfs_attr_node_removename); |
1850 | 1839 | ||
@@ -2440,11 +2429,9 @@ DEFINE_DEFER_EVENT(xfs_defer_finish_done); | |||
2440 | 2429 | ||
2441 | DEFINE_DEFER_ERROR_EVENT(xfs_defer_trans_roll_error); | 2430 | DEFINE_DEFER_ERROR_EVENT(xfs_defer_trans_roll_error); |
2442 | DEFINE_DEFER_ERROR_EVENT(xfs_defer_finish_error); | 2431 | DEFINE_DEFER_ERROR_EVENT(xfs_defer_finish_error); |
2443 | DEFINE_DEFER_ERROR_EVENT(xfs_defer_op_finish_error); | ||
2444 | 2432 | ||
2445 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_intake_work); | 2433 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_intake_work); |
2446 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_intake_cancel); | 2434 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_intake_cancel); |
2447 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_commit); | ||
2448 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_cancel); | 2435 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_cancel); |
2449 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish); | 2436 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish); |
2450 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort); | 2437 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort); |
@@ -3092,87 +3079,6 @@ DEFINE_EVENT(xfs_double_io_class, name, \ | |||
3092 | struct xfs_inode *dest, xfs_off_t doffset), \ | 3079 | struct xfs_inode *dest, xfs_off_t doffset), \ |
3093 | TP_ARGS(src, soffset, len, dest, doffset)) | 3080 | TP_ARGS(src, soffset, len, dest, doffset)) |
3094 | 3081 | ||
3095 | /* two-file vfs io tracepoint class */ | ||
3096 | DECLARE_EVENT_CLASS(xfs_double_vfs_io_class, | ||
3097 | TP_PROTO(struct inode *src, u64 soffset, u64 len, | ||
3098 | struct inode *dest, u64 doffset), | ||
3099 | TP_ARGS(src, soffset, len, dest, doffset), | ||
3100 | TP_STRUCT__entry( | ||
3101 | __field(dev_t, dev) | ||
3102 | __field(unsigned long, src_ino) | ||
3103 | __field(loff_t, src_isize) | ||
3104 | __field(loff_t, src_offset) | ||
3105 | __field(size_t, len) | ||
3106 | __field(unsigned long, dest_ino) | ||
3107 | __field(loff_t, dest_isize) | ||
3108 | __field(loff_t, dest_offset) | ||
3109 | ), | ||
3110 | TP_fast_assign( | ||
3111 | __entry->dev = src->i_sb->s_dev; | ||
3112 | __entry->src_ino = src->i_ino; | ||
3113 | __entry->src_isize = i_size_read(src); | ||
3114 | __entry->src_offset = soffset; | ||
3115 | __entry->len = len; | ||
3116 | __entry->dest_ino = dest->i_ino; | ||
3117 | __entry->dest_isize = i_size_read(dest); | ||
3118 | __entry->dest_offset = doffset; | ||
3119 | ), | ||
3120 | TP_printk("dev %d:%d count %zd " | ||
3121 | "ino 0x%lx isize 0x%llx offset 0x%llx -> " | ||
3122 | "ino 0x%lx isize 0x%llx offset 0x%llx", | ||
3123 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
3124 | __entry->len, | ||
3125 | __entry->src_ino, | ||
3126 | __entry->src_isize, | ||
3127 | __entry->src_offset, | ||
3128 | __entry->dest_ino, | ||
3129 | __entry->dest_isize, | ||
3130 | __entry->dest_offset) | ||
3131 | ) | ||
3132 | |||
3133 | #define DEFINE_DOUBLE_VFS_IO_EVENT(name) \ | ||
3134 | DEFINE_EVENT(xfs_double_vfs_io_class, name, \ | ||
3135 | TP_PROTO(struct inode *src, u64 soffset, u64 len, \ | ||
3136 | struct inode *dest, u64 doffset), \ | ||
3137 | TP_ARGS(src, soffset, len, dest, doffset)) | ||
3138 | |||
3139 | /* CoW write tracepoint */ | ||
3140 | DECLARE_EVENT_CLASS(xfs_copy_on_write_class, | ||
3141 | TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t lblk, xfs_fsblock_t pblk, | ||
3142 | xfs_extlen_t len, xfs_fsblock_t new_pblk), | ||
3143 | TP_ARGS(ip, lblk, pblk, len, new_pblk), | ||
3144 | TP_STRUCT__entry( | ||
3145 | __field(dev_t, dev) | ||
3146 | __field(xfs_ino_t, ino) | ||
3147 | __field(xfs_fileoff_t, lblk) | ||
3148 | __field(xfs_fsblock_t, pblk) | ||
3149 | __field(xfs_extlen_t, len) | ||
3150 | __field(xfs_fsblock_t, new_pblk) | ||
3151 | ), | ||
3152 | TP_fast_assign( | ||
3153 | __entry->dev = VFS_I(ip)->i_sb->s_dev; | ||
3154 | __entry->ino = ip->i_ino; | ||
3155 | __entry->lblk = lblk; | ||
3156 | __entry->pblk = pblk; | ||
3157 | __entry->len = len; | ||
3158 | __entry->new_pblk = new_pblk; | ||
3159 | ), | ||
3160 | TP_printk("dev %d:%d ino 0x%llx lblk 0x%llx pblk 0x%llx " | ||
3161 | "len 0x%x new_pblk %llu", | ||
3162 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
3163 | __entry->ino, | ||
3164 | __entry->lblk, | ||
3165 | __entry->pblk, | ||
3166 | __entry->len, | ||
3167 | __entry->new_pblk) | ||
3168 | ) | ||
3169 | |||
3170 | #define DEFINE_COW_EVENT(name) \ | ||
3171 | DEFINE_EVENT(xfs_copy_on_write_class, name, \ | ||
3172 | TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t lblk, xfs_fsblock_t pblk, \ | ||
3173 | xfs_extlen_t len, xfs_fsblock_t new_pblk), \ | ||
3174 | TP_ARGS(ip, lblk, pblk, len, new_pblk)) | ||
3175 | |||
3176 | /* inode/irec events */ | 3082 | /* inode/irec events */ |
3177 | DECLARE_EVENT_CLASS(xfs_inode_irec_class, | 3083 | DECLARE_EVENT_CLASS(xfs_inode_irec_class, |
3178 | TP_PROTO(struct xfs_inode *ip, struct xfs_bmbt_irec *irec), | 3084 | TP_PROTO(struct xfs_inode *ip, struct xfs_bmbt_irec *irec), |
@@ -3292,8 +3198,6 @@ DEFINE_DOUBLE_IO_EVENT(xfs_reflink_remap_range); | |||
3292 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_range_error); | 3198 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_range_error); |
3293 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_set_inode_flag_error); | 3199 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_set_inode_flag_error); |
3294 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_update_inode_size_error); | 3200 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_update_inode_size_error); |
3295 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_reflink_main_loop_error); | ||
3296 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_read_iomap_error); | ||
3297 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_blocks_error); | 3201 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_blocks_error); |
3298 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_extent_error); | 3202 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_extent_error); |
3299 | 3203 | ||
@@ -3302,9 +3206,6 @@ DEFINE_DOUBLE_IO_EVENT(xfs_reflink_compare_extents); | |||
3302 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_compare_extents_error); | 3206 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_compare_extents_error); |
3303 | 3207 | ||
3304 | /* ioctl tracepoints */ | 3208 | /* ioctl tracepoints */ |
3305 | DEFINE_DOUBLE_VFS_IO_EVENT(xfs_ioctl_reflink); | ||
3306 | DEFINE_DOUBLE_VFS_IO_EVENT(xfs_ioctl_clone_range); | ||
3307 | DEFINE_DOUBLE_VFS_IO_EVENT(xfs_ioctl_file_extent_same); | ||
3308 | TRACE_EVENT(xfs_ioctl_clone, | 3209 | TRACE_EVENT(xfs_ioctl_clone, |
3309 | TP_PROTO(struct inode *src, struct inode *dest), | 3210 | TP_PROTO(struct inode *src, struct inode *dest), |
3310 | TP_ARGS(src, dest), | 3211 | TP_ARGS(src, dest), |
@@ -3334,11 +3235,7 @@ TRACE_EVENT(xfs_ioctl_clone, | |||
3334 | 3235 | ||
3335 | /* unshare tracepoints */ | 3236 | /* unshare tracepoints */ |
3336 | DEFINE_SIMPLE_IO_EVENT(xfs_reflink_unshare); | 3237 | DEFINE_SIMPLE_IO_EVENT(xfs_reflink_unshare); |
3337 | DEFINE_SIMPLE_IO_EVENT(xfs_reflink_cow_eof_block); | ||
3338 | DEFINE_PAGE_EVENT(xfs_reflink_unshare_page); | ||
3339 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_unshare_error); | 3238 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_unshare_error); |
3340 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_cow_eof_block_error); | ||
3341 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_dirty_page_error); | ||
3342 | 3239 | ||
3343 | /* copy on write */ | 3240 | /* copy on write */ |
3344 | DEFINE_INODE_IREC_EVENT(xfs_reflink_trim_around_shared); | 3241 | DEFINE_INODE_IREC_EVENT(xfs_reflink_trim_around_shared); |
@@ -3361,14 +3258,8 @@ DEFINE_INODE_ERROR_EVENT(xfs_reflink_allocate_cow_range_error); | |||
3361 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_cow_range_error); | 3258 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_cow_range_error); |
3362 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_cow_error); | 3259 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_cow_error); |
3363 | 3260 | ||
3364 | DEFINE_COW_EVENT(xfs_reflink_fork_buf); | ||
3365 | DEFINE_COW_EVENT(xfs_reflink_finish_fork_buf); | ||
3366 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_fork_buf_error); | ||
3367 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_finish_fork_buf_error); | ||
3368 | 3261 | ||
3369 | DEFINE_INODE_EVENT(xfs_reflink_cancel_pending_cow); | ||
3370 | DEFINE_INODE_IREC_EVENT(xfs_reflink_cancel_cow); | 3262 | DEFINE_INODE_IREC_EVENT(xfs_reflink_cancel_cow); |
3371 | DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_pending_cow_error); | ||
3372 | 3263 | ||
3373 | /* rmap swapext tracepoints */ | 3264 | /* rmap swapext tracepoints */ |
3374 | DEFINE_INODE_IREC_EVENT(xfs_swap_extent_rmap_remap); | 3265 | DEFINE_INODE_IREC_EVENT(xfs_swap_extent_rmap_remap); |