License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 17:07:57 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2013-04-19 20:28:40 +04:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM f2fs
|
|
|
|
|
|
|
|
#if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_F2FS_H
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
2020-11-02 09:21:31 +03:00
|
|
|
#include <uapi/linux/f2fs.h>
|
2013-04-19 20:28:40 +04:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
#define show_dev(dev) MAJOR(dev), MINOR(dev)
|
|
|
|
#define show_dev_ino(entry) show_dev(entry->dev), (unsigned long)entry->ino
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(NODE);
|
|
|
|
TRACE_DEFINE_ENUM(DATA);
|
|
|
|
TRACE_DEFINE_ENUM(META);
|
|
|
|
TRACE_DEFINE_ENUM(META_FLUSH);
|
2015-04-23 02:07:38 +03:00
|
|
|
TRACE_DEFINE_ENUM(IPU);
|
|
|
|
TRACE_DEFINE_ENUM(OPU);
|
2017-05-10 21:18:25 +03:00
|
|
|
TRACE_DEFINE_ENUM(HOT);
|
|
|
|
TRACE_DEFINE_ENUM(WARM);
|
|
|
|
TRACE_DEFINE_ENUM(COLD);
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(CURSEG_HOT_DATA);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_WARM_DATA);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_COLD_DATA);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_HOT_NODE);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_WARM_NODE);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_COLD_NODE);
|
|
|
|
TRACE_DEFINE_ENUM(NO_CHECK_TYPE);
|
|
|
|
TRACE_DEFINE_ENUM(GC_GREEDY);
|
|
|
|
TRACE_DEFINE_ENUM(GC_CB);
|
|
|
|
TRACE_DEFINE_ENUM(FG_GC);
|
|
|
|
TRACE_DEFINE_ENUM(BG_GC);
|
|
|
|
TRACE_DEFINE_ENUM(LFS);
|
|
|
|
TRACE_DEFINE_ENUM(SSR);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_RAHEAD);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_SYNC);
|
2016-11-01 16:40:09 +03:00
|
|
|
TRACE_DEFINE_ENUM(__REQ_IDLE);
|
2016-06-05 22:32:25 +03:00
|
|
|
TRACE_DEFINE_ENUM(__REQ_PREFLUSH);
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(__REQ_FUA);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_PRIO);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_META);
|
|
|
|
TRACE_DEFINE_ENUM(CP_UMOUNT);
|
|
|
|
TRACE_DEFINE_ENUM(CP_FASTBOOT);
|
|
|
|
TRACE_DEFINE_ENUM(CP_SYNC);
|
2015-04-23 02:07:38 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_RECOVERY);
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_DISCARD);
|
2017-04-28 08:56:08 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_TRIMMED);
|
2020-01-03 06:19:28 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_PAUSE);
|
2020-03-31 21:43:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_RESIZE);
|
2022-11-30 20:26:29 +03:00
|
|
|
TRACE_DEFINE_ENUM(EX_READ);
|
2022-12-02 04:37:15 +03:00
|
|
|
TRACE_DEFINE_ENUM(EX_BLOCK_AGE);
|
2015-03-27 23:18:07 +03:00
|
|
|
|
2013-04-23 12:51:43 +04:00
|
|
|
#define show_block_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ NODE, "NODE" }, \
|
|
|
|
{ DATA, "DATA" }, \
|
|
|
|
{ META, "META" }, \
|
2015-03-18 03:58:08 +03:00
|
|
|
{ META_FLUSH, "META_FLUSH" }, \
|
|
|
|
{ IPU, "IN-PLACE" }, \
|
|
|
|
{ OPU, "OUT-OF-PLACE" })
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2017-05-10 21:18:25 +03:00
|
|
|
#define show_block_temp(temp) \
|
|
|
|
__print_symbolic(temp, \
|
|
|
|
{ HOT, "HOT" }, \
|
|
|
|
{ WARM, "WARM" }, \
|
|
|
|
{ COLD, "COLD" })
|
|
|
|
|
2017-05-04 04:35:43 +03:00
|
|
|
#define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_META | REQ_PRIO | \
|
|
|
|
REQ_PREFLUSH | REQ_FUA)
|
2022-07-14 21:07:18 +03:00
|
|
|
#define F2FS_BIO_FLAG_MASK(t) (__force u32)((t) & F2FS_OP_FLAGS)
|
2016-12-22 01:26:39 +03:00
|
|
|
|
|
|
|
#define show_bio_type(op,op_flags) show_bio_op(op), \
|
|
|
|
show_bio_op_flags(op_flags)
|
|
|
|
|
2019-06-20 20:59:19 +03:00
|
|
|
#define show_bio_op(op) blk_op_str(op)
|
2016-06-05 22:31:55 +03:00
|
|
|
|
|
|
|
#define show_bio_op_flags(flags) \
|
2017-05-04 04:35:43 +03:00
|
|
|
__print_flags(F2FS_BIO_FLAG_MASK(flags), "|", \
|
2022-07-14 21:07:18 +03:00
|
|
|
{ (__force u32)REQ_RAHEAD, "R" }, \
|
|
|
|
{ (__force u32)REQ_SYNC, "S" }, \
|
|
|
|
{ (__force u32)REQ_META, "M" }, \
|
|
|
|
{ (__force u32)REQ_PRIO, "P" }, \
|
|
|
|
{ (__force u32)REQ_PREFLUSH, "PF" }, \
|
|
|
|
{ (__force u32)REQ_FUA, "FUA" })
|
2013-11-24 09:42:23 +04:00
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
#define show_data_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ CURSEG_HOT_DATA, "Hot DATA" }, \
|
|
|
|
{ CURSEG_WARM_DATA, "Warm DATA" }, \
|
|
|
|
{ CURSEG_COLD_DATA, "Cold DATA" }, \
|
|
|
|
{ CURSEG_HOT_NODE, "Hot NODE" }, \
|
|
|
|
{ CURSEG_WARM_NODE, "Warm NODE" }, \
|
|
|
|
{ CURSEG_COLD_NODE, "Cold NODE" }, \
|
|
|
|
{ NO_CHECK_TYPE, "No TYPE" })
|
|
|
|
|
2013-10-24 12:53:29 +04:00
|
|
|
#define show_file_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ 0, "FILE" }, \
|
|
|
|
{ 1, "DIR" })
|
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
#define show_gc_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ FG_GC, "Foreground GC" }, \
|
|
|
|
{ BG_GC, "Background GC" })
|
|
|
|
|
|
|
|
#define show_alloc_mode(type) \
|
|
|
|
__print_symbolic(type, \
|
f2fs: support age threshold based garbage collection
There are several issues in current background GC algorithm:
- valid blocks is one of key factors during cost overhead calculation,
so if segment has less valid block, however even its age is young or
it locates hot segment, CB algorithm will still choose the segment as
victim, it's not appropriate.
- GCed data/node will go to existing logs, no matter in-there datas'
update frequency is the same or not, it may mix hot and cold data
again.
- GC alloctor mainly use LFS type segment, it will cost free segment
more quickly.
This patch introduces a new algorithm named age threshold based
garbage collection to solve above issues, there are three steps
mainly:
1. select a source victim:
- set an age threshold, and select candidates beased threshold:
e.g.
0 means youngest, 100 means oldest, if we set age threshold to 80
then select dirty segments which has age in range of [80, 100] as
candiddates;
- set candidate_ratio threshold, and select candidates based the
ratio, so that we can shrink candidates to those oldest segments;
- select target segment with fewest valid blocks in order to
migrate blocks with minimum cost;
2. select a target victim:
- select candidates beased age threshold;
- set candidate_radius threshold, search candidates whose age is
around source victims, searching radius should less than the
radius threshold.
- select target segment with most valid blocks in order to avoid
migrating current target segment.
3. merge valid blocks from source victim into target victim with
SSR alloctor.
Test steps:
- create 160 dirty segments:
* half of them have 128 valid blocks per segment
* left of them have 384 valid blocks per segment
- run background GC
Benefit: GC count and block movement count both decrease obviously:
- Before:
- Valid: 86
- Dirty: 1
- Prefree: 11
- Free: 6001 (6001)
GC calls: 162 (BG: 220)
- data segments : 160 (160)
- node segments : 2 (2)
Try to move 41454 blocks (BG: 41454)
- data blocks : 40960 (40960)
- node blocks : 494 (494)
IPU: 0 blocks
SSR: 0 blocks in 0 segments
LFS: 41364 blocks in 81 segments
- After:
- Valid: 87
- Dirty: 0
- Prefree: 4
- Free: 6008 (6008)
GC calls: 75 (BG: 76)
- data segments : 74 (74)
- node segments : 1 (1)
Try to move 12813 blocks (BG: 12813)
- data blocks : 12544 (12544)
- node blocks : 269 (269)
IPU: 0 blocks
SSR: 12032 blocks in 77 segments
LFS: 855 blocks in 2 segments
Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: fix a bug along with pinfile in-mem segment & clean up]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-08-04 16:14:49 +03:00
|
|
|
{ LFS, "LFS-mode" }, \
|
|
|
|
{ SSR, "SSR-mode" }, \
|
|
|
|
{ AT_SSR, "AT_SSR-mode" })
|
2013-04-23 11:42:53 +04:00
|
|
|
|
|
|
|
#define show_victim_policy(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ GC_GREEDY, "Greedy" }, \
|
f2fs: support age threshold based garbage collection
There are several issues in current background GC algorithm:
- valid blocks is one of key factors during cost overhead calculation,
so if segment has less valid block, however even its age is young or
it locates hot segment, CB algorithm will still choose the segment as
victim, it's not appropriate.
- GCed data/node will go to existing logs, no matter in-there datas'
update frequency is the same or not, it may mix hot and cold data
again.
- GC alloctor mainly use LFS type segment, it will cost free segment
more quickly.
This patch introduces a new algorithm named age threshold based
garbage collection to solve above issues, there are three steps
mainly:
1. select a source victim:
- set an age threshold, and select candidates beased threshold:
e.g.
0 means youngest, 100 means oldest, if we set age threshold to 80
then select dirty segments which has age in range of [80, 100] as
candiddates;
- set candidate_ratio threshold, and select candidates based the
ratio, so that we can shrink candidates to those oldest segments;
- select target segment with fewest valid blocks in order to
migrate blocks with minimum cost;
2. select a target victim:
- select candidates beased age threshold;
- set candidate_radius threshold, search candidates whose age is
around source victims, searching radius should less than the
radius threshold.
- select target segment with most valid blocks in order to avoid
migrating current target segment.
3. merge valid blocks from source victim into target victim with
SSR alloctor.
Test steps:
- create 160 dirty segments:
* half of them have 128 valid blocks per segment
* left of them have 384 valid blocks per segment
- run background GC
Benefit: GC count and block movement count both decrease obviously:
- Before:
- Valid: 86
- Dirty: 1
- Prefree: 11
- Free: 6001 (6001)
GC calls: 162 (BG: 220)
- data segments : 160 (160)
- node segments : 2 (2)
Try to move 41454 blocks (BG: 41454)
- data blocks : 40960 (40960)
- node blocks : 494 (494)
IPU: 0 blocks
SSR: 0 blocks in 0 segments
LFS: 41364 blocks in 81 segments
- After:
- Valid: 87
- Dirty: 0
- Prefree: 4
- Free: 6008 (6008)
GC calls: 75 (BG: 76)
- data segments : 74 (74)
- node segments : 1 (1)
Try to move 12813 blocks (BG: 12813)
- data blocks : 12544 (12544)
- node blocks : 269 (269)
IPU: 0 blocks
SSR: 12032 blocks in 77 segments
LFS: 855 blocks in 2 segments
Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: fix a bug along with pinfile in-mem segment & clean up]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-08-04 16:14:49 +03:00
|
|
|
{ GC_CB, "Cost-Benefit" }, \
|
|
|
|
{ GC_AT, "Age-threshold" })
|
2013-04-23 11:42:53 +04:00
|
|
|
|
2014-09-21 08:57:51 +04:00
|
|
|
#define show_cpreason(type) \
|
2017-05-04 04:35:43 +03:00
|
|
|
__print_flags(type, "|", \
|
2014-09-21 08:57:51 +04:00
|
|
|
{ CP_UMOUNT, "Umount" }, \
|
2015-01-29 22:45:33 +03:00
|
|
|
{ CP_FASTBOOT, "Fastboot" }, \
|
2014-09-21 09:06:39 +04:00
|
|
|
{ CP_SYNC, "Sync" }, \
|
2015-04-10 03:03:53 +03:00
|
|
|
{ CP_RECOVERY, "Recovery" }, \
|
2017-04-28 08:56:08 +03:00
|
|
|
{ CP_DISCARD, "Discard" }, \
|
2020-01-03 06:19:28 +03:00
|
|
|
{ CP_PAUSE, "Pause" }, \
|
2020-03-31 21:43:07 +03:00
|
|
|
{ CP_TRIMMED, "Trimmed" }, \
|
|
|
|
{ CP_RESIZE, "Resize" })
|
2014-09-21 08:57:51 +04:00
|
|
|
|
2017-11-06 17:51:45 +03:00
|
|
|
#define show_fsync_cpreason(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ CP_NO_NEEDED, "no needed" }, \
|
|
|
|
{ CP_NON_REGULAR, "non regular" }, \
|
2020-09-03 05:15:15 +03:00
|
|
|
{ CP_COMPRESSED, "compressed" }, \
|
2017-11-06 17:51:45 +03:00
|
|
|
{ CP_HARDLINK, "hardlink" }, \
|
|
|
|
{ CP_SB_NEED_CP, "sb needs cp" }, \
|
|
|
|
{ CP_WRONG_PINO, "wrong pino" }, \
|
|
|
|
{ CP_NO_SPC_ROLL, "no space roll forward" }, \
|
|
|
|
{ CP_NODE_NEED_CP, "node needs cp" }, \
|
|
|
|
{ CP_FASTBOOT_MODE, "fastboot mode" }, \
|
2017-12-28 19:09:44 +03:00
|
|
|
{ CP_SPEC_LOG_NUM, "log type is 2" }, \
|
|
|
|
{ CP_RECOVER_DIR, "dir needs recovery" })
|
2017-11-06 17:51:45 +03:00
|
|
|
|
2019-02-26 14:01:15 +03:00
|
|
|
#define show_shutdown_mode(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ F2FS_GOING_DOWN_FULLSYNC, "full sync" }, \
|
|
|
|
{ F2FS_GOING_DOWN_METASYNC, "meta sync" }, \
|
|
|
|
{ F2FS_GOING_DOWN_NOSYNC, "no sync" }, \
|
|
|
|
{ F2FS_GOING_DOWN_METAFLUSH, "meta flush" }, \
|
|
|
|
{ F2FS_GOING_DOWN_NEED_FSCK, "need fsck" })
|
|
|
|
|
f2fs: support data compression
This patch tries to support compression in f2fs.
- New term named cluster is defined as basic unit of compression, file can
be divided into multiple clusters logically. One cluster includes 4 << n
(n >= 0) logical pages, compression size is also cluster size, each of
cluster can be compressed or not.
- In cluster metadata layout, one special flag is used to indicate cluster
is compressed one or normal one, for compressed cluster, following metadata
maps cluster to [1, 4 << n - 1] physical blocks, in where f2fs stores
data including compress header and compressed data.
- In order to eliminate write amplification during overwrite, F2FS only
support compression on write-once file, data can be compressed only when
all logical blocks in file are valid and cluster compress ratio is lower
than specified threshold.
- To enable compression on regular inode, there are three ways:
* chattr +c file
* chattr +c dir; touch dir/file
* mount w/ -o compress_extension=ext; touch file.ext
Compress metadata layout:
[Dnode Structure]
+-----------------------------------------------+
| cluster 1 | cluster 2 | ......... | cluster N |
+-----------------------------------------------+
. . . .
. . . .
. Compressed Cluster . . Normal Cluster .
+----------+---------+---------+---------+ +---------+---------+---------+---------+
|compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 |
+----------+---------+---------+---------+ +---------+---------+---------+---------+
. .
. .
. .
+-------------+-------------+----------+----------------------------+
| data length | data chksum | reserved | compressed data |
+-------------+-------------+----------+----------------------------+
Changelog:
20190326:
- fix error handling of read_end_io().
- remove unneeded comments in f2fs_encrypt_one_page().
20190327:
- fix wrong use of f2fs_cluster_is_full() in f2fs_mpage_readpages().
- don't jump into loop directly to avoid uninitialized variables.
- add TODO tag in error path of f2fs_write_cache_pages().
20190328:
- fix wrong merge condition in f2fs_read_multi_pages().
- check compressed file in f2fs_post_read_required().
20190401
- allow overwrite on non-compressed cluster.
- check cluster meta before writing compressed data.
20190402
- don't preallocate blocks for compressed file.
- add lz4 compress algorithm
- process multiple post read works in one workqueue
Now f2fs supports processing post read work in multiple workqueue,
it shows low performance due to schedule overhead of multiple
workqueue executing orderly.
20190921
- compress: support buffered overwrite
C: compress cluster flag
V: valid block address
N: NEW_ADDR
One cluster contain 4 blocks
before overwrite after overwrite
- VVVV -> CVNN
- CVNN -> VVVV
- CVNN -> CVNN
- CVNN -> CVVV
- CVVV -> CVNN
- CVVV -> CVVV
20191029
- add kconfig F2FS_FS_COMPRESSION to isolate compression related
codes, add kconfig F2FS_FS_{LZO,LZ4} to cover backend algorithm.
note that: will remove lzo backend if Jaegeuk agreed that too.
- update codes according to Eric's comments.
20191101
- apply fixes from Jaegeuk
20191113
- apply fixes from Jaegeuk
- split workqueue for fsverity
20191216
- apply fixes from Jaegeuk
20200117
- fix to avoid NULL pointer dereference
[Jaegeuk Kim]
- add tracepoint for f2fs_{,de}compress_pages()
- fix many bugs and add some compression stats
- fix overwrite/mmap bugs
- address 32bit build error, reported by Geert.
- bug fixes when handling errors and i_compressed_blocks
Reported-by: <noreply@ellerman.id.au>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-11-01 13:07:14 +03:00
|
|
|
#define show_compress_algorithm(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ COMPRESS_LZO, "LZO" }, \
|
2020-03-03 12:46:02 +03:00
|
|
|
{ COMPRESS_LZ4, "LZ4" }, \
|
2020-04-08 14:56:32 +03:00
|
|
|
{ COMPRESS_ZSTD, "ZSTD" }, \
|
|
|
|
{ COMPRESS_LZORLE, "LZO-RLE" })
|
f2fs: support data compression
This patch tries to support compression in f2fs.
- New term named cluster is defined as basic unit of compression, file can
be divided into multiple clusters logically. One cluster includes 4 << n
(n >= 0) logical pages, compression size is also cluster size, each of
cluster can be compressed or not.
- In cluster metadata layout, one special flag is used to indicate cluster
is compressed one or normal one, for compressed cluster, following metadata
maps cluster to [1, 4 << n - 1] physical blocks, in where f2fs stores
data including compress header and compressed data.
- In order to eliminate write amplification during overwrite, F2FS only
support compression on write-once file, data can be compressed only when
all logical blocks in file are valid and cluster compress ratio is lower
than specified threshold.
- To enable compression on regular inode, there are three ways:
* chattr +c file
* chattr +c dir; touch dir/file
* mount w/ -o compress_extension=ext; touch file.ext
Compress metadata layout:
[Dnode Structure]
+-----------------------------------------------+
| cluster 1 | cluster 2 | ......... | cluster N |
+-----------------------------------------------+
. . . .
. . . .
. Compressed Cluster . . Normal Cluster .
+----------+---------+---------+---------+ +---------+---------+---------+---------+
|compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 |
+----------+---------+---------+---------+ +---------+---------+---------+---------+
. .
. .
. .
+-------------+-------------+----------+----------------------------+
| data length | data chksum | reserved | compressed data |
+-------------+-------------+----------+----------------------------+
Changelog:
20190326:
- fix error handling of read_end_io().
- remove unneeded comments in f2fs_encrypt_one_page().
20190327:
- fix wrong use of f2fs_cluster_is_full() in f2fs_mpage_readpages().
- don't jump into loop directly to avoid uninitialized variables.
- add TODO tag in error path of f2fs_write_cache_pages().
20190328:
- fix wrong merge condition in f2fs_read_multi_pages().
- check compressed file in f2fs_post_read_required().
20190401
- allow overwrite on non-compressed cluster.
- check cluster meta before writing compressed data.
20190402
- don't preallocate blocks for compressed file.
- add lz4 compress algorithm
- process multiple post read works in one workqueue
Now f2fs supports processing post read work in multiple workqueue,
it shows low performance due to schedule overhead of multiple
workqueue executing orderly.
20190921
- compress: support buffered overwrite
C: compress cluster flag
V: valid block address
N: NEW_ADDR
One cluster contain 4 blocks
before overwrite after overwrite
- VVVV -> CVNN
- CVNN -> VVVV
- CVNN -> CVNN
- CVNN -> CVVV
- CVVV -> CVNN
- CVVV -> CVVV
20191029
- add kconfig F2FS_FS_COMPRESSION to isolate compression related
codes, add kconfig F2FS_FS_{LZO,LZ4} to cover backend algorithm.
note that: will remove lzo backend if Jaegeuk agreed that too.
- update codes according to Eric's comments.
20191101
- apply fixes from Jaegeuk
20191113
- apply fixes from Jaegeuk
- split workqueue for fsverity
20191216
- apply fixes from Jaegeuk
20200117
- fix to avoid NULL pointer dereference
[Jaegeuk Kim]
- add tracepoint for f2fs_{,de}compress_pages()
- fix many bugs and add some compression stats
- fix overwrite/mmap bugs
- address 32bit build error, reported by Geert.
- bug fixes when handling errors and i_compressed_blocks
Reported-by: <noreply@ellerman.id.au>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-11-01 13:07:14 +03:00
|
|
|
|
2022-12-02 04:37:15 +03:00
|
|
|
#define show_extent_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ EX_READ, "Read" }, \
|
|
|
|
{ EX_BLOCK_AGE, "Block Age" })
|
|
|
|
|
2019-01-03 15:06:38 +03:00
|
|
|
struct f2fs_sb_info;
|
|
|
|
struct f2fs_io_info;
|
|
|
|
struct extent_info;
|
2013-04-23 11:42:53 +04:00
|
|
|
struct victim_sel_policy;
|
2015-04-07 05:55:34 +03:00
|
|
|
struct f2fs_map_blocks;
|
2013-04-23 11:42:53 +04:00
|
|
|
|
2013-04-19 20:28:40 +04:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(ino_t, pino)
|
|
|
|
__field(umode_t, mode)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(unsigned int, nlink)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(__u8, advise)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pino = F2FS_I(inode)->i_pino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->nlink = inode->i_nlink;
|
|
|
|
__entry->size = inode->i_size;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
__entry->advise = F2FS_I(inode)->i_advise;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
|
|
|
|
"i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->pino,
|
|
|
|
__entry->mode,
|
|
|
|
__entry->size,
|
|
|
|
(unsigned int)__entry->nlink,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
(unsigned char)__entry->advise)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__inode_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_sync_file_exit,
|
|
|
|
|
2017-11-06 17:51:45 +03:00
|
|
|
TP_PROTO(struct inode *inode, int cp_reason, int datasync, int ret),
|
2013-04-19 20:28:40 +04:00
|
|
|
|
2017-11-06 17:51:45 +03:00
|
|
|
TP_ARGS(inode, cp_reason, datasync, ret),
|
2013-04-19 20:28:40 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2017-11-06 17:51:45 +03:00
|
|
|
__field(int, cp_reason)
|
2013-04-19 20:28:40 +04:00
|
|
|
__field(int, datasync)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
2017-11-06 17:51:45 +03:00
|
|
|
__entry->cp_reason = cp_reason;
|
2013-04-19 20:28:40 +04:00
|
|
|
__entry->datasync = datasync;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
2017-11-06 17:51:45 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, cp_reason: %s, "
|
2013-04-19 20:28:40 +04:00
|
|
|
"datasync = %d, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
2017-11-06 17:51:45 +03:00
|
|
|
show_fsync_cpreason(__entry->cp_reason),
|
2013-04-19 20:28:40 +04:00
|
|
|
__entry->datasync,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_sync_fs,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int wait),
|
|
|
|
|
|
|
|
TP_ARGS(sb, wait),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2015-02-11 03:23:12 +03:00
|
|
|
__field(int, dirty)
|
2013-04-19 20:28:40 +04:00
|
|
|
__field(int, wait)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2015-01-28 12:48:42 +03:00
|
|
|
__entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY);
|
2013-04-19 20:28:40 +04:00
|
|
|
__entry->wait = wait;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-04-19 20:28:40 +04:00
|
|
|
__entry->dirty ? "dirty" : "not dirty",
|
|
|
|
__entry->wait)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_iget,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_iget_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_evict_inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
2013-04-25 08:24:33 +04:00
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
2013-04-19 20:28:40 +04:00
|
|
|
TRACE_EVENT(f2fs_unlink_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *dir, struct dentry *dentry),
|
|
|
|
|
|
|
|
TP_ARGS(dir, dentry),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(blkcnt_t, blocks)
|
2022-10-27 12:12:40 +03:00
|
|
|
__string(name, dentry->d_name.name)
|
2013-04-19 20:28:40 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = dir->i_sb->s_dev;
|
|
|
|
__entry->ino = dir->i_ino;
|
|
|
|
__entry->size = dir->i_size;
|
|
|
|
__entry->blocks = dir->i_blocks;
|
2022-10-27 12:12:40 +03:00
|
|
|
__assign_str(name, dentry->d_name.name);
|
2013-04-19 20:28:40 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
|
|
|
|
"i_blocks = %llu, name = %s",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->size,
|
|
|
|
(unsigned long long)__entry->blocks,
|
2022-10-27 12:12:40 +03:00
|
|
|
__get_str(name))
|
2013-04-19 20:28:40 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_unlink_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
2013-04-19 20:28:52 +04:00
|
|
|
|
2017-02-27 16:02:58 +03:00
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_drop_inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
2013-04-19 20:28:52 +04:00
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_truncate,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_truncate_data_blocks_range,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, ofs, free),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(nid_t, nid)
|
|
|
|
__field(unsigned int, ofs)
|
|
|
|
__field(int, free)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nid = nid;
|
|
|
|
__entry->ofs = ofs;
|
|
|
|
__entry->free = free;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned int)__entry->nid,
|
|
|
|
__entry->ofs,
|
|
|
|
__entry->free)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__truncate_op,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, u64 from),
|
|
|
|
|
|
|
|
TP_ARGS(inode, from),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(u64, from)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->size = inode->i_size;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
__entry->from = from;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
|
|
|
|
"start file offset = %llu",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->size,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
(unsigned long long)__entry->from)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_blocks_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, u64 from),
|
|
|
|
|
|
|
|
TP_ARGS(inode, from)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_blocks_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_inode_blocks_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, u64 from),
|
|
|
|
|
|
|
|
TP_ARGS(inode, from)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_inode_blocks_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__truncate_node,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, blk_addr),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(nid_t, nid)
|
|
|
|
__field(block_t, blk_addr)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nid = nid;
|
|
|
|
__entry->blk_addr = blk_addr;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned int)__entry->nid,
|
|
|
|
(unsigned long long)__entry->blk_addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_nodes_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, blk_addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_nodes_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_node,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, blk_addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_truncate_partial_nodes,
|
|
|
|
|
2018-03-28 22:05:32 +03:00
|
|
|
TP_PROTO(struct inode *inode, nid_t *nid, int depth, int err),
|
2013-04-19 20:28:52 +04:00
|
|
|
|
|
|
|
TP_ARGS(inode, nid, depth, err),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2023-03-06 15:25:49 +03:00
|
|
|
__array(nid_t, nid, 3)
|
2013-04-19 20:28:52 +04:00
|
|
|
__field(int, depth)
|
|
|
|
__field(int, err)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nid[0] = nid[0];
|
|
|
|
__entry->nid[1] = nid[1];
|
|
|
|
__entry->nid[2] = nid[2];
|
|
|
|
__entry->depth = depth;
|
|
|
|
__entry->err = err;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, "
|
|
|
|
"nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned int)__entry->nid[0],
|
|
|
|
(unsigned int)__entry->nid[1],
|
|
|
|
(unsigned int)__entry->nid[2],
|
|
|
|
__entry->depth,
|
|
|
|
__entry->err)
|
|
|
|
);
|
|
|
|
|
2019-04-02 13:52:22 +03:00
|
|
|
TRACE_EVENT(f2fs_file_write_iter,
|
|
|
|
|
2021-07-16 17:39:15 +03:00
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, size_t length,
|
|
|
|
ssize_t ret),
|
2019-04-02 13:52:22 +03:00
|
|
|
|
|
|
|
TP_ARGS(inode, offset, length, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2021-07-16 17:39:15 +03:00
|
|
|
__field(loff_t, offset)
|
|
|
|
__field(size_t, length)
|
|
|
|
__field(ssize_t, ret)
|
2019-04-02 13:52:22 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->offset = offset;
|
|
|
|
__entry->length = length;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, "
|
2021-07-16 17:39:15 +03:00
|
|
|
"offset = %lld, length = %zu, written(err) = %zd",
|
2019-04-02 13:52:22 +03:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->offset,
|
|
|
|
__entry->length,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2015-04-07 05:55:34 +03:00
|
|
|
TRACE_EVENT(f2fs_map_blocks,
|
2022-11-28 12:15:20 +03:00
|
|
|
TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int flag,
|
|
|
|
int ret),
|
2013-04-23 11:38:02 +04:00
|
|
|
|
2022-11-28 12:15:20 +03:00
|
|
|
TP_ARGS(inode, map, flag, ret),
|
2013-04-23 11:38:02 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2015-04-07 05:55:34 +03:00
|
|
|
__field(block_t, m_lblk)
|
|
|
|
__field(block_t, m_pblk)
|
|
|
|
__field(unsigned int, m_len)
|
2019-02-26 14:01:16 +03:00
|
|
|
__field(unsigned int, m_flags)
|
|
|
|
__field(int, m_seg_type)
|
|
|
|
__field(bool, m_may_create)
|
2021-09-01 09:39:20 +03:00
|
|
|
__field(bool, m_multidev_dio)
|
|
|
|
__field(int, flag)
|
2013-04-23 11:38:02 +04:00
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2021-09-01 09:39:20 +03:00
|
|
|
__entry->dev = map->m_bdev->bd_dev;
|
2013-04-23 11:38:02 +04:00
|
|
|
__entry->ino = inode->i_ino;
|
2015-04-07 05:55:34 +03:00
|
|
|
__entry->m_lblk = map->m_lblk;
|
|
|
|
__entry->m_pblk = map->m_pblk;
|
|
|
|
__entry->m_len = map->m_len;
|
2019-02-26 14:01:16 +03:00
|
|
|
__entry->m_flags = map->m_flags;
|
|
|
|
__entry->m_seg_type = map->m_seg_type;
|
|
|
|
__entry->m_may_create = map->m_may_create;
|
2021-09-01 09:39:20 +03:00
|
|
|
__entry->m_multidev_dio = map->m_multidev_dio;
|
|
|
|
__entry->flag = flag;
|
2013-04-23 11:38:02 +04:00
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
|
2021-09-01 09:39:20 +03:00
|
|
|
"start blkaddr = 0x%llx, len = 0x%llx, flags = %u, "
|
|
|
|
"seg_type = %d, may_create = %d, multidevice = %d, "
|
2022-11-28 12:15:20 +03:00
|
|
|
"flag = %d, err = %d",
|
2013-04-23 11:38:02 +04:00
|
|
|
show_dev_ino(__entry),
|
2015-04-07 05:55:34 +03:00
|
|
|
(unsigned long long)__entry->m_lblk,
|
|
|
|
(unsigned long long)__entry->m_pblk,
|
|
|
|
(unsigned long long)__entry->m_len,
|
2019-02-26 14:01:16 +03:00
|
|
|
__entry->m_flags,
|
|
|
|
__entry->m_seg_type,
|
|
|
|
__entry->m_may_create,
|
2021-09-01 09:39:20 +03:00
|
|
|
__entry->m_multidev_dio,
|
|
|
|
__entry->flag,
|
2013-04-23 11:38:02 +04:00
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2015-10-05 21:32:34 +03:00
|
|
|
TRACE_EVENT(f2fs_background_gc,
|
|
|
|
|
2017-08-07 18:12:46 +03:00
|
|
|
TP_PROTO(struct super_block *sb, unsigned int wait_ms,
|
2015-10-05 21:32:34 +03:00
|
|
|
unsigned int prefree, unsigned int free),
|
|
|
|
|
|
|
|
TP_ARGS(sb, wait_ms, prefree, free),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2017-08-07 18:12:46 +03:00
|
|
|
__field(unsigned int, wait_ms)
|
2015-10-05 21:32:34 +03:00
|
|
|
__field(unsigned int, prefree)
|
|
|
|
__field(unsigned int, free)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->wait_ms = wait_ms;
|
|
|
|
__entry->prefree = prefree;
|
|
|
|
__entry->free = free;
|
|
|
|
),
|
|
|
|
|
2017-08-07 18:12:46 +03:00
|
|
|
TP_printk("dev = (%d,%d), wait_ms = %u, prefree = %u, free = %u",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2015-10-05 21:32:34 +03:00
|
|
|
__entry->wait_ms,
|
|
|
|
__entry->prefree,
|
|
|
|
__entry->free)
|
|
|
|
);
|
|
|
|
|
2017-08-11 13:00:15 +03:00
|
|
|
TRACE_EVENT(f2fs_gc_begin,
|
|
|
|
|
2022-05-06 21:40:33 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int gc_type, bool no_bg_gc,
|
2022-05-06 23:34:41 +03:00
|
|
|
unsigned int nr_free_secs,
|
2017-08-11 13:00:15 +03:00
|
|
|
long long dirty_nodes, long long dirty_dents,
|
|
|
|
long long dirty_imeta, unsigned int free_sec,
|
|
|
|
unsigned int free_seg, int reserved_seg,
|
|
|
|
unsigned int prefree_seg),
|
|
|
|
|
2022-05-06 23:34:41 +03:00
|
|
|
TP_ARGS(sb, gc_type, no_bg_gc, nr_free_secs, dirty_nodes,
|
|
|
|
dirty_dents, dirty_imeta,
|
2017-08-11 13:00:15 +03:00
|
|
|
free_sec, free_seg, reserved_seg, prefree_seg),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2022-05-06 21:40:33 +03:00
|
|
|
__field(int, gc_type)
|
|
|
|
__field(bool, no_bg_gc)
|
2022-05-06 23:34:41 +03:00
|
|
|
__field(unsigned int, nr_free_secs)
|
2017-08-11 13:00:15 +03:00
|
|
|
__field(long long, dirty_nodes)
|
|
|
|
__field(long long, dirty_dents)
|
|
|
|
__field(long long, dirty_imeta)
|
|
|
|
__field(unsigned int, free_sec)
|
|
|
|
__field(unsigned int, free_seg)
|
|
|
|
__field(int, reserved_seg)
|
|
|
|
__field(unsigned int, prefree_seg)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2022-05-06 21:40:33 +03:00
|
|
|
__entry->gc_type = gc_type;
|
|
|
|
__entry->no_bg_gc = no_bg_gc;
|
2022-05-06 23:34:41 +03:00
|
|
|
__entry->nr_free_secs = nr_free_secs;
|
2017-08-11 13:00:15 +03:00
|
|
|
__entry->dirty_nodes = dirty_nodes;
|
|
|
|
__entry->dirty_dents = dirty_dents;
|
|
|
|
__entry->dirty_imeta = dirty_imeta;
|
|
|
|
__entry->free_sec = free_sec;
|
|
|
|
__entry->free_seg = free_seg;
|
|
|
|
__entry->reserved_seg = reserved_seg;
|
|
|
|
__entry->prefree_seg = prefree_seg;
|
|
|
|
),
|
|
|
|
|
2022-05-06 23:34:41 +03:00
|
|
|
TP_printk("dev = (%d,%d), gc_type = %s, no_background_GC = %d, nr_free_secs = %u, "
|
|
|
|
"nodes = %lld, dents = %lld, imeta = %lld, free_sec:%u, free_seg:%u, "
|
2017-08-11 13:00:15 +03:00
|
|
|
"rsv_seg:%d, prefree_seg:%u",
|
|
|
|
show_dev(__entry->dev),
|
2022-05-06 21:40:33 +03:00
|
|
|
show_gc_type(__entry->gc_type),
|
|
|
|
(__entry->gc_type == BG_GC) ? __entry->no_bg_gc : -1,
|
2022-05-06 23:34:41 +03:00
|
|
|
__entry->nr_free_secs,
|
2017-08-11 13:00:15 +03:00
|
|
|
__entry->dirty_nodes,
|
|
|
|
__entry->dirty_dents,
|
|
|
|
__entry->dirty_imeta,
|
|
|
|
__entry->free_sec,
|
|
|
|
__entry->free_seg,
|
|
|
|
__entry->reserved_seg,
|
|
|
|
__entry->prefree_seg)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_gc_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int ret, int seg_freed,
|
|
|
|
int sec_freed, long long dirty_nodes,
|
|
|
|
long long dirty_dents, long long dirty_imeta,
|
|
|
|
unsigned int free_sec, unsigned int free_seg,
|
|
|
|
int reserved_seg, unsigned int prefree_seg),
|
|
|
|
|
|
|
|
TP_ARGS(sb, ret, seg_freed, sec_freed, dirty_nodes, dirty_dents,
|
|
|
|
dirty_imeta, free_sec, free_seg, reserved_seg, prefree_seg),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(int, ret)
|
|
|
|
__field(int, seg_freed)
|
|
|
|
__field(int, sec_freed)
|
|
|
|
__field(long long, dirty_nodes)
|
|
|
|
__field(long long, dirty_dents)
|
|
|
|
__field(long long, dirty_imeta)
|
|
|
|
__field(unsigned int, free_sec)
|
|
|
|
__field(unsigned int, free_seg)
|
|
|
|
__field(int, reserved_seg)
|
|
|
|
__field(unsigned int, prefree_seg)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->ret = ret;
|
|
|
|
__entry->seg_freed = seg_freed;
|
|
|
|
__entry->sec_freed = sec_freed;
|
|
|
|
__entry->dirty_nodes = dirty_nodes;
|
|
|
|
__entry->dirty_dents = dirty_dents;
|
|
|
|
__entry->dirty_imeta = dirty_imeta;
|
|
|
|
__entry->free_sec = free_sec;
|
|
|
|
__entry->free_seg = free_seg;
|
|
|
|
__entry->reserved_seg = reserved_seg;
|
|
|
|
__entry->prefree_seg = prefree_seg;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ret = %d, seg_freed = %d, sec_freed = %d, "
|
|
|
|
"nodes = %lld, dents = %lld, imeta = %lld, free_sec:%u, "
|
|
|
|
"free_seg:%u, rsv_seg:%d, prefree_seg:%u",
|
|
|
|
show_dev(__entry->dev),
|
|
|
|
__entry->ret,
|
|
|
|
__entry->seg_freed,
|
|
|
|
__entry->sec_freed,
|
|
|
|
__entry->dirty_nodes,
|
|
|
|
__entry->dirty_dents,
|
|
|
|
__entry->dirty_imeta,
|
|
|
|
__entry->free_sec,
|
|
|
|
__entry->free_seg,
|
|
|
|
__entry->reserved_seg,
|
|
|
|
__entry->prefree_seg)
|
|
|
|
);
|
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
TRACE_EVENT(f2fs_get_victim,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int type, int gc_type,
|
|
|
|
struct victim_sel_policy *p, unsigned int pre_victim,
|
|
|
|
unsigned int prefree, unsigned int free),
|
|
|
|
|
|
|
|
TP_ARGS(sb, type, gc_type, p, pre_victim, prefree, free),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(int, type)
|
|
|
|
__field(int, gc_type)
|
|
|
|
__field(int, alloc_mode)
|
|
|
|
__field(int, gc_mode)
|
|
|
|
__field(unsigned int, victim)
|
2017-02-16 21:35:41 +03:00
|
|
|
__field(unsigned int, cost)
|
2013-04-23 11:42:53 +04:00
|
|
|
__field(unsigned int, ofs_unit)
|
|
|
|
__field(unsigned int, pre_victim)
|
|
|
|
__field(unsigned int, prefree)
|
|
|
|
__field(unsigned int, free)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->gc_type = gc_type;
|
|
|
|
__entry->alloc_mode = p->alloc_mode;
|
|
|
|
__entry->gc_mode = p->gc_mode;
|
|
|
|
__entry->victim = p->min_segno;
|
2017-02-16 21:35:41 +03:00
|
|
|
__entry->cost = p->min_cost;
|
2013-04-23 11:42:53 +04:00
|
|
|
__entry->ofs_unit = p->ofs_unit;
|
|
|
|
__entry->pre_victim = pre_victim;
|
|
|
|
__entry->prefree = prefree;
|
|
|
|
__entry->free = free;
|
|
|
|
),
|
|
|
|
|
2017-02-16 21:35:41 +03:00
|
|
|
TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), "
|
|
|
|
"victim = %u, cost = %u, ofs_unit = %u, "
|
|
|
|
"pre_victim_secno = %d, prefree = %u, free = %u",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-04-23 11:42:53 +04:00
|
|
|
show_data_type(__entry->type),
|
|
|
|
show_gc_type(__entry->gc_type),
|
|
|
|
show_alloc_mode(__entry->alloc_mode),
|
|
|
|
show_victim_policy(__entry->gc_mode),
|
|
|
|
__entry->victim,
|
2017-02-16 21:35:41 +03:00
|
|
|
__entry->cost,
|
2013-04-23 11:42:53 +04:00
|
|
|
__entry->ofs_unit,
|
|
|
|
(int)__entry->pre_victim,
|
|
|
|
__entry->prefree,
|
|
|
|
__entry->free)
|
|
|
|
);
|
|
|
|
|
2017-10-17 12:33:41 +03:00
|
|
|
TRACE_EVENT(f2fs_lookup_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
|
|
|
|
|
|
|
|
TP_ARGS(dir, dentry, flags),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2021-09-21 17:37:30 +03:00
|
|
|
__string(name, dentry->d_name.name)
|
2017-10-17 12:33:41 +03:00
|
|
|
__field(unsigned int, flags)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = dir->i_sb->s_dev;
|
|
|
|
__entry->ino = dir->i_ino;
|
2021-09-21 17:37:30 +03:00
|
|
|
__assign_str(name, dentry->d_name.name);
|
2017-10-17 12:33:41 +03:00
|
|
|
__entry->flags = flags;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), pino = %lu, name:%s, flags:%u",
|
|
|
|
show_dev_ino(__entry),
|
2021-09-21 17:37:30 +03:00
|
|
|
__get_str(name),
|
2017-10-17 12:33:41 +03:00
|
|
|
__entry->flags)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_lookup_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *dir, struct dentry *dentry, nid_t ino,
|
|
|
|
int err),
|
|
|
|
|
|
|
|
TP_ARGS(dir, dentry, ino, err),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2021-09-21 17:37:30 +03:00
|
|
|
__string(name, dentry->d_name.name)
|
2017-10-17 12:33:41 +03:00
|
|
|
__field(nid_t, cino)
|
|
|
|
__field(int, err)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = dir->i_sb->s_dev;
|
|
|
|
__entry->ino = dir->i_ino;
|
2021-09-21 17:37:30 +03:00
|
|
|
__assign_str(name, dentry->d_name.name);
|
2017-10-17 12:33:41 +03:00
|
|
|
__entry->cino = ino;
|
|
|
|
__entry->err = err;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), pino = %lu, name:%s, ino:%u, err:%d",
|
|
|
|
show_dev_ino(__entry),
|
2021-09-21 17:37:30 +03:00
|
|
|
__get_str(name),
|
2017-10-17 12:33:41 +03:00
|
|
|
__entry->cino,
|
|
|
|
__entry->err)
|
|
|
|
);
|
|
|
|
|
2017-10-13 13:01:33 +03:00
|
|
|
TRACE_EVENT(f2fs_readdir,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *dir, loff_t start_pos, loff_t end_pos, int err),
|
|
|
|
|
|
|
|
TP_ARGS(dir, start_pos, end_pos, err),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, start)
|
|
|
|
__field(loff_t, end)
|
|
|
|
__field(int, err)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = dir->i_sb->s_dev;
|
|
|
|
__entry->ino = dir->i_ino;
|
|
|
|
__entry->start = start_pos;
|
|
|
|
__entry->end = end_pos;
|
|
|
|
__entry->err = err;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, start_pos:%llu, end_pos:%llu, err:%d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->start,
|
|
|
|
__entry->end,
|
|
|
|
__entry->err)
|
|
|
|
);
|
|
|
|
|
2013-04-23 12:00:52 +04:00
|
|
|
TRACE_EVENT(f2fs_fallocate,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int mode,
|
|
|
|
loff_t offset, loff_t len, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, mode, offset, len, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, mode)
|
|
|
|
__field(loff_t, offset)
|
|
|
|
__field(loff_t, len)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = mode;
|
|
|
|
__entry->offset = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->size = inode->i_size;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
|
|
|
|
"len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->mode,
|
|
|
|
(unsigned long long)__entry->offset,
|
|
|
|
(unsigned long long)__entry->len,
|
|
|
|
(unsigned long long)__entry->size,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2014-07-31 17:11:22 +04:00
|
|
|
TRACE_EVENT(f2fs_direct_IO_enter,
|
|
|
|
|
2021-11-19 22:20:33 +03:00
|
|
|
TP_PROTO(struct inode *inode, struct kiocb *iocb, long len, int rw),
|
2014-07-31 17:11:22 +04:00
|
|
|
|
2021-11-19 22:20:33 +03:00
|
|
|
TP_ARGS(inode, iocb, len, rw),
|
2014-07-31 17:11:22 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2022-10-27 12:12:40 +03:00
|
|
|
__field(loff_t, ki_pos)
|
|
|
|
__field(int, ki_flags)
|
|
|
|
__field(u16, ki_ioprio)
|
2014-07-31 17:11:22 +04:00
|
|
|
__field(unsigned long, len)
|
|
|
|
__field(int, rw)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2022-10-27 12:12:40 +03:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->ki_pos = iocb->ki_pos;
|
|
|
|
__entry->ki_flags = iocb->ki_flags;
|
|
|
|
__entry->ki_ioprio = iocb->ki_ioprio;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->rw = rw;
|
2014-07-31 17:11:22 +04:00
|
|
|
),
|
|
|
|
|
2022-03-08 09:05:28 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu ki_flags = %x ki_ioprio = %x rw = %d",
|
2014-07-31 17:11:22 +04:00
|
|
|
show_dev_ino(__entry),
|
2022-10-27 12:12:40 +03:00
|
|
|
__entry->ki_pos,
|
2014-07-31 17:11:22 +04:00
|
|
|
__entry->len,
|
2022-10-27 12:12:40 +03:00
|
|
|
__entry->ki_flags,
|
|
|
|
__entry->ki_ioprio,
|
2014-07-31 17:11:22 +04:00
|
|
|
__entry->rw)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_direct_IO_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
|
|
|
|
int rw, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, len, rw, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned long, len)
|
|
|
|
__field(int, rw)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->rw = rw;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
|
|
|
|
"rw = %d ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pos,
|
|
|
|
__entry->len,
|
|
|
|
__entry->rw,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TRACE_EVENT(f2fs_reserve_new_blocks,
|
2013-04-23 12:00:52 +04:00
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node,
|
|
|
|
blkcnt_t count),
|
2013-04-23 12:00:52 +04:00
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TP_ARGS(inode, nid, ofs_in_node, count),
|
2013-04-23 12:00:52 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(nid_t, nid)
|
|
|
|
__field(unsigned int, ofs_in_node)
|
2016-05-09 14:56:30 +03:00
|
|
|
__field(blkcnt_t, count)
|
2013-04-23 12:00:52 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->nid = nid;
|
|
|
|
__entry->ofs_in_node = ofs_in_node;
|
2016-05-09 14:56:30 +03:00
|
|
|
__entry->count = count;
|
2013-04-23 12:00:52 +04:00
|
|
|
),
|
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u, count = %llu",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-04-23 12:00:52 +04:00
|
|
|
(unsigned int)__entry->nid,
|
2016-05-09 14:56:30 +03:00
|
|
|
__entry->ofs_in_node,
|
|
|
|
(unsigned long long)__entry->count)
|
2013-04-23 12:00:52 +04:00
|
|
|
);
|
|
|
|
|
2014-12-23 11:35:21 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
|
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_PROTO(struct page *page, struct f2fs_io_info *fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_ARGS(page, fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, index)
|
f2fs: trace old block address for CoWed page
This patch enables to trace old block address of CoWed page for better
debugging.
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 13:36:38 +03:00
|
|
|
__field(block_t, old_blkaddr)
|
|
|
|
__field(block_t, new_blkaddr)
|
2022-07-14 21:07:18 +03:00
|
|
|
__field(enum req_op, op)
|
|
|
|
__field(blk_opf_t, op_flags)
|
2017-05-10 21:18:25 +03:00
|
|
|
__field(int, temp)
|
2014-12-23 11:35:21 +03:00
|
|
|
__field(int, type)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2019-07-02 05:15:29 +03:00
|
|
|
__entry->dev = page_file_mapping(page)->host->i_sb->s_dev;
|
|
|
|
__entry->ino = page_file_mapping(page)->host->i_ino;
|
2014-12-23 11:35:21 +03:00
|
|
|
__entry->index = page->index;
|
f2fs: trace old block address for CoWed page
This patch enables to trace old block address of CoWed page for better
debugging.
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 13:36:38 +03:00
|
|
|
__entry->old_blkaddr = fio->old_blkaddr;
|
|
|
|
__entry->new_blkaddr = fio->new_blkaddr;
|
2016-06-05 22:31:55 +03:00
|
|
|
__entry->op = fio->op;
|
|
|
|
__entry->op_flags = fio->op_flags;
|
2017-05-10 21:18:25 +03:00
|
|
|
__entry->temp = fio->temp;
|
2014-12-24 11:08:14 +03:00
|
|
|
__entry->type = fio->type;
|
2014-12-23 11:35:21 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
|
2017-05-10 21:18:25 +03:00
|
|
|
"oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s(%s), type = %s_%s",
|
2014-12-23 11:35:21 +03:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->index,
|
f2fs: trace old block address for CoWed page
This patch enables to trace old block address of CoWed page for better
debugging.
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 13:36:38 +03:00
|
|
|
(unsigned long long)__entry->old_blkaddr,
|
|
|
|
(unsigned long long)__entry->new_blkaddr,
|
2016-12-22 01:26:39 +03:00
|
|
|
show_bio_type(__entry->op, __entry->op_flags),
|
2017-05-10 21:18:25 +03:00
|
|
|
show_block_temp(__entry->temp),
|
2014-12-23 11:35:21 +03:00
|
|
|
show_block_type(__entry->type))
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio,
|
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_PROTO(struct page *page, struct f2fs_io_info *fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_ARGS(page, fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
|
|
|
TP_CONDITION(page->mapping)
|
|
|
|
);
|
|
|
|
|
2017-05-10 21:28:38 +03:00
|
|
|
DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_write,
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_PROTO(struct page *page, struct f2fs_io_info *fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_ARGS(page, fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
|
|
|
TP_CONDITION(page->mapping)
|
|
|
|
);
|
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__bio,
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_ARGS(sb, type, bio),
|
2013-04-23 12:51:43 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2017-02-15 22:14:06 +03:00
|
|
|
__field(dev_t, target)
|
2022-07-14 21:07:18 +03:00
|
|
|
__field(enum req_op, op)
|
|
|
|
__field(blk_opf_t, op_flags)
|
2013-11-24 07:36:42 +04:00
|
|
|
__field(int, type)
|
2013-04-23 12:51:43 +04:00
|
|
|
__field(sector_t, sector)
|
|
|
|
__field(unsigned int, size)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2017-08-23 20:10:32 +03:00
|
|
|
__entry->target = bio_dev(bio);
|
2016-12-21 23:13:03 +03:00
|
|
|
__entry->op = bio_op(bio);
|
|
|
|
__entry->op_flags = bio->bi_opf;
|
|
|
|
__entry->type = type;
|
2013-10-12 02:44:27 +04:00
|
|
|
__entry->sector = bio->bi_iter.bi_sector;
|
|
|
|
__entry->size = bio->bi_iter.bi_size;
|
2013-04-23 12:51:43 +04:00
|
|
|
),
|
|
|
|
|
2017-05-04 04:35:43 +03:00
|
|
|
TP_printk("dev = (%d,%d)/(%d,%d), rw = %s(%s), %s, sector = %lld, size = %u",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->target),
|
|
|
|
show_dev(__entry->dev),
|
2016-12-22 01:26:39 +03:00
|
|
|
show_bio_type(__entry->op, __entry->op_flags),
|
2013-11-24 07:36:42 +04:00
|
|
|
show_block_type(__entry->type),
|
2013-04-23 12:51:43 +04:00
|
|
|
(unsigned long long)__entry->sector,
|
|
|
|
__entry->size)
|
|
|
|
);
|
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_write_bio,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
|
|
|
|
|
|
|
TP_ARGS(sb, type, bio),
|
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_read_bio,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
|
|
|
|
|
|
|
TP_ARGS(sb, type, bio),
|
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_read_bio,
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_ARGS(sb, type, bio),
|
2013-11-30 07:51:14 +04:00
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
2013-11-24 07:36:42 +04:00
|
|
|
);
|
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_ARGS(sb, type, bio),
|
2013-11-30 07:51:14 +04:00
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
2013-11-24 07:36:42 +04:00
|
|
|
);
|
|
|
|
|
2014-05-06 12:46:04 +04:00
|
|
|
TRACE_EVENT(f2fs_write_begin,
|
|
|
|
|
2022-02-22 22:31:43 +03:00
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
|
2014-05-06 12:46:04 +04:00
|
|
|
|
2022-02-22 22:31:43 +03:00
|
|
|
TP_ARGS(inode, pos, len),
|
2014-05-06 12:46:04 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = pos;
|
|
|
|
__entry->len = len;
|
|
|
|
),
|
|
|
|
|
2022-02-22 22:31:43 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u",
|
2014-05-06 12:46:04 +04:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long long)__entry->pos,
|
2022-02-22 22:31:43 +03:00
|
|
|
__entry->len)
|
2014-05-06 12:46:04 +04:00
|
|
|
);
|
|
|
|
|
2014-05-06 12:47:23 +04:00
|
|
|
TRACE_EVENT(f2fs_write_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pos, len, copied),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
__field(unsigned int, copied)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = pos;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->copied = copied;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long long)__entry->pos,
|
|
|
|
__entry->len,
|
|
|
|
__entry->copied)
|
|
|
|
);
|
|
|
|
|
2013-10-24 12:53:29 +04:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__page,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, type)
|
|
|
|
__field(int, dir)
|
|
|
|
__field(pgoff_t, index)
|
|
|
|
__field(int, dirty)
|
2014-05-06 12:53:08 +04:00
|
|
|
__field(int, uptodate)
|
2013-10-24 12:53:29 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2019-07-02 05:15:29 +03:00
|
|
|
__entry->dev = page_file_mapping(page)->host->i_sb->s_dev;
|
|
|
|
__entry->ino = page_file_mapping(page)->host->i_ino;
|
2013-10-24 12:53:29 +04:00
|
|
|
__entry->type = type;
|
2019-07-02 05:15:29 +03:00
|
|
|
__entry->dir =
|
|
|
|
S_ISDIR(page_file_mapping(page)->host->i_mode);
|
2013-10-24 12:53:29 +04:00
|
|
|
__entry->index = page->index;
|
|
|
|
__entry->dirty = PageDirty(page);
|
2014-05-06 12:53:08 +04:00
|
|
|
__entry->uptodate = PageUptodate(page);
|
2013-10-24 12:53:29 +04:00
|
|
|
),
|
|
|
|
|
2014-05-06 12:53:08 +04:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
|
|
|
|
"dirty = %d, uptodate = %d",
|
2013-10-24 12:53:29 +04:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
show_block_type(__entry->type),
|
|
|
|
show_file_type(__entry->dir),
|
|
|
|
(unsigned long)__entry->index,
|
2014-05-06 12:53:08 +04:00
|
|
|
__entry->dirty,
|
|
|
|
__entry->uptodate)
|
2013-10-24 12:53:29 +04:00
|
|
|
);
|
|
|
|
|
2014-05-06 12:48:26 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_writepage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2015-03-18 03:58:08 +03:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2014-05-06 12:53:08 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_readpage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2013-10-24 12:53:29 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2013-10-25 09:26:31 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2023-01-09 06:44:49 +03:00
|
|
|
TRACE_EVENT(f2fs_replace_atomic_write_block,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, struct inode *cow_inode, pgoff_t index,
|
|
|
|
block_t old_addr, block_t new_addr, bool recovery),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cow_inode, index, old_addr, new_addr, recovery),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(ino_t, cow_ino)
|
|
|
|
__field(pgoff_t, index)
|
|
|
|
__field(block_t, old_addr)
|
|
|
|
__field(block_t, new_addr)
|
|
|
|
__field(bool, recovery)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->cow_ino = cow_inode->i_ino;
|
|
|
|
__entry->index = index;
|
|
|
|
__entry->old_addr = old_addr;
|
|
|
|
__entry->new_addr = new_addr;
|
|
|
|
__entry->recovery = recovery;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, cow_ino = %lu, index = %lu, "
|
|
|
|
"old_addr = 0x%llx, new_addr = 0x%llx, recovery = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->cow_ino,
|
|
|
|
(unsigned long)__entry->index,
|
|
|
|
(unsigned long long)__entry->old_addr,
|
|
|
|
(unsigned long long)__entry->new_addr,
|
|
|
|
__entry->recovery)
|
|
|
|
);
|
|
|
|
|
2019-04-15 10:22:19 +03:00
|
|
|
TRACE_EVENT(f2fs_filemap_fault,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t index, unsigned long ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, index, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, index)
|
|
|
|
__field(unsigned long, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->index = index;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %lx",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->index,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2014-05-06 12:51:24 +04:00
|
|
|
TRACE_EVENT(f2fs_writepages,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, struct writeback_control *wbc, int type),
|
|
|
|
|
|
|
|
TP_ARGS(inode, wbc, type),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, type)
|
|
|
|
__field(int, dir)
|
|
|
|
__field(long, nr_to_write)
|
|
|
|
__field(long, pages_skipped)
|
|
|
|
__field(loff_t, range_start)
|
|
|
|
__field(loff_t, range_end)
|
|
|
|
__field(pgoff_t, writeback_index)
|
|
|
|
__field(int, sync_mode)
|
|
|
|
__field(char, for_kupdate)
|
|
|
|
__field(char, for_background)
|
|
|
|
__field(char, tagged_writepages)
|
|
|
|
__field(char, for_reclaim)
|
|
|
|
__field(char, range_cyclic)
|
|
|
|
__field(char, for_sync)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->dir = S_ISDIR(inode->i_mode);
|
|
|
|
__entry->nr_to_write = wbc->nr_to_write;
|
|
|
|
__entry->pages_skipped = wbc->pages_skipped;
|
|
|
|
__entry->range_start = wbc->range_start;
|
|
|
|
__entry->range_end = wbc->range_end;
|
|
|
|
__entry->writeback_index = inode->i_mapping->writeback_index;
|
|
|
|
__entry->sync_mode = wbc->sync_mode;
|
|
|
|
__entry->for_kupdate = wbc->for_kupdate;
|
|
|
|
__entry->for_background = wbc->for_background;
|
|
|
|
__entry->tagged_writepages = wbc->tagged_writepages;
|
|
|
|
__entry->for_reclaim = wbc->for_reclaim;
|
|
|
|
__entry->range_cyclic = wbc->range_cyclic;
|
|
|
|
__entry->for_sync = wbc->for_sync;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
|
|
|
|
"skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
|
|
|
|
"kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
show_block_type(__entry->type),
|
|
|
|
show_file_type(__entry->dir),
|
|
|
|
__entry->nr_to_write,
|
|
|
|
__entry->pages_skipped,
|
|
|
|
__entry->range_start,
|
|
|
|
__entry->range_end,
|
|
|
|
(unsigned long)__entry->writeback_index,
|
|
|
|
__entry->sync_mode,
|
|
|
|
__entry->for_kupdate,
|
|
|
|
__entry->for_background,
|
|
|
|
__entry->tagged_writepages,
|
|
|
|
__entry->for_reclaim,
|
|
|
|
__entry->range_cyclic,
|
|
|
|
__entry->for_sync)
|
|
|
|
);
|
|
|
|
|
2015-10-12 12:02:26 +03:00
|
|
|
TRACE_EVENT(f2fs_readpages,
|
|
|
|
|
2020-06-02 07:47:23 +03:00
|
|
|
TP_PROTO(struct inode *inode, pgoff_t start, unsigned int nrpage),
|
2015-10-12 12:02:26 +03:00
|
|
|
|
2020-06-02 07:47:23 +03:00
|
|
|
TP_ARGS(inode, start, nrpage),
|
2015-10-12 12:02:26 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, start)
|
|
|
|
__field(unsigned int, nrpage)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
2020-06-02 07:47:23 +03:00
|
|
|
__entry->start = start;
|
2015-10-12 12:02:26 +03:00
|
|
|
__entry->nrpage = nrpage;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->start,
|
|
|
|
__entry->nrpage)
|
|
|
|
);
|
|
|
|
|
2013-04-23 13:26:54 +04:00
|
|
|
TRACE_EVENT(f2fs_write_checkpoint,
|
|
|
|
|
2022-10-27 12:12:41 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int reason, const char *msg),
|
2013-04-23 13:26:54 +04:00
|
|
|
|
2014-09-21 08:57:51 +04:00
|
|
|
TP_ARGS(sb, reason, msg),
|
2013-04-23 13:26:54 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2014-09-21 08:57:51 +04:00
|
|
|
__field(int, reason)
|
2022-10-27 12:12:40 +03:00
|
|
|
__string(dest_msg, msg)
|
2013-04-23 13:26:54 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2014-09-21 08:57:51 +04:00
|
|
|
__entry->reason = reason;
|
2022-10-27 12:12:40 +03:00
|
|
|
__assign_str(dest_msg, msg);
|
2013-04-23 13:26:54 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2014-09-21 08:57:51 +04:00
|
|
|
show_cpreason(__entry->reason),
|
2022-10-27 12:12:40 +03:00
|
|
|
__get_str(dest_msg))
|
2013-04-23 13:26:54 +04:00
|
|
|
);
|
|
|
|
|
2017-04-15 09:09:38 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs_discard,
|
2013-11-12 12:01:00 +04:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
|
2013-11-12 12:01:00 +04:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_ARGS(dev, blkstart, blklen),
|
2013-11-12 12:01:00 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(block_t, blkstart)
|
|
|
|
__field(block_t, blklen)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->dev = dev->bd_dev;
|
2013-11-12 12:01:00 +04:00
|
|
|
__entry->blkstart = blkstart;
|
|
|
|
__entry->blklen = blklen;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-11-12 12:01:00 +04:00
|
|
|
(unsigned long long)__entry->blkstart,
|
|
|
|
(unsigned long long)__entry->blklen)
|
|
|
|
);
|
2014-07-26 04:46:10 +04:00
|
|
|
|
2017-04-15 09:09:38 +03:00
|
|
|
DEFINE_EVENT(f2fs_discard, f2fs_queue_discard,
|
|
|
|
|
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
|
|
|
|
|
|
|
|
TP_ARGS(dev, blkstart, blklen)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_discard, f2fs_issue_discard,
|
|
|
|
|
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
|
|
|
|
|
|
|
|
TP_ARGS(dev, blkstart, blklen)
|
|
|
|
);
|
|
|
|
|
2017-10-04 04:08:36 +03:00
|
|
|
DEFINE_EVENT(f2fs_discard, f2fs_remove_discard,
|
|
|
|
|
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
|
|
|
|
|
|
|
|
TP_ARGS(dev, blkstart, blklen)
|
|
|
|
);
|
|
|
|
|
2023-05-08 11:10:42 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs_reset_zone,
|
2016-10-28 11:45:07 +03:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart),
|
2016-10-28 11:45:07 +03:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_ARGS(dev, blkstart),
|
2016-10-28 11:45:07 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(block_t, blkstart)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->dev = dev->bd_dev;
|
2016-10-28 11:45:07 +03:00
|
|
|
__entry->blkstart = blkstart;
|
|
|
|
),
|
|
|
|
|
2023-05-08 11:10:42 +03:00
|
|
|
TP_printk("dev = (%d,%d), zone at block = 0x%llx",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2016-10-28 11:45:07 +03:00
|
|
|
(unsigned long long)__entry->blkstart)
|
|
|
|
);
|
|
|
|
|
2023-05-08 11:10:42 +03:00
|
|
|
DEFINE_EVENT(f2fs_reset_zone, f2fs_queue_reset_zone,
|
|
|
|
|
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart),
|
|
|
|
|
|
|
|
TP_ARGS(dev, blkstart)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_reset_zone, f2fs_issue_reset_zone,
|
|
|
|
|
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart),
|
|
|
|
|
|
|
|
TP_ARGS(dev, blkstart)
|
|
|
|
);
|
|
|
|
|
2014-07-26 04:46:10 +04:00
|
|
|
TRACE_EVENT(f2fs_issue_flush,
|
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_PROTO(struct block_device *dev, unsigned int nobarrier,
|
2017-03-04 17:13:10 +03:00
|
|
|
unsigned int flush_merge, int ret),
|
2014-07-26 04:46:10 +04:00
|
|
|
|
2017-03-04 17:13:10 +03:00
|
|
|
TP_ARGS(dev, nobarrier, flush_merge, ret),
|
2014-07-26 04:46:10 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2015-02-11 03:23:12 +03:00
|
|
|
__field(unsigned int, nobarrier)
|
|
|
|
__field(unsigned int, flush_merge)
|
2017-03-04 17:13:10 +03:00
|
|
|
__field(int, ret)
|
2014-07-26 04:46:10 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->dev = dev->bd_dev;
|
2014-07-26 04:46:10 +04:00
|
|
|
__entry->nobarrier = nobarrier;
|
|
|
|
__entry->flush_merge = flush_merge;
|
2017-03-04 17:13:10 +03:00
|
|
|
__entry->ret = ret;
|
2014-07-26 04:46:10 +04:00
|
|
|
),
|
|
|
|
|
2017-03-04 17:13:10 +03:00
|
|
|
TP_printk("dev = (%d,%d), %s %s, ret = %d",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2014-07-26 04:46:10 +04:00
|
|
|
__entry->nobarrier ? "skip (nobarrier)" : "issue",
|
2017-03-04 17:13:10 +03:00
|
|
|
__entry->flush_merge ? " with flush_merge" : "",
|
|
|
|
__entry->ret)
|
2014-07-26 04:46:10 +04:00
|
|
|
);
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_lookup_extent_tree_start,
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs, enum extent_type type),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_ARGS(inode, pgofs, type),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
2022-11-30 20:26:29 +03:00
|
|
|
__field(enum extent_type, type)
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->type = type;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, type = %s",
|
2015-02-05 12:59:59 +03:00
|
|
|
show_dev_ino(__entry),
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->pgofs,
|
2022-12-02 04:37:15 +03:00
|
|
|
show_extent_type(__entry->type))
|
2015-02-05 12:59:59 +03:00
|
|
|
);
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TRACE_EVENT_CONDITION(f2fs_lookup_read_extent_tree_end,
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs,
|
2015-06-30 02:01:14 +03:00
|
|
|
struct extent_info *ei),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2015-06-30 02:01:14 +03:00
|
|
|
TP_ARGS(inode, pgofs, ei),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2015-06-30 02:01:14 +03:00
|
|
|
TP_CONDITION(ei),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
__field(unsigned int, fofs)
|
|
|
|
__field(unsigned int, len)
|
2022-11-30 20:26:29 +03:00
|
|
|
__field(u32, blk)
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
2015-06-30 02:01:14 +03:00
|
|
|
__entry->fofs = ei->fofs;
|
|
|
|
__entry->len = ei->len;
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->blk = ei->blk;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
2022-11-30 20:26:29 +03:00
|
|
|
"read_ext_info(fofs: %u, len: %u, blk: %u)",
|
2015-02-05 12:59:59 +03:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs,
|
|
|
|
__entry->fofs,
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->len,
|
|
|
|
__entry->blk)
|
2015-02-05 12:59:59 +03:00
|
|
|
);
|
|
|
|
|
2022-12-02 04:37:15 +03:00
|
|
|
TRACE_EVENT_CONDITION(f2fs_lookup_age_extent_tree_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs,
|
|
|
|
struct extent_info *ei),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pgofs, ei),
|
|
|
|
|
|
|
|
TP_CONDITION(ei),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
__field(unsigned int, fofs)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
__field(unsigned long long, age)
|
|
|
|
__field(unsigned long long, blocks)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
|
|
|
__entry->fofs = ei->fofs;
|
|
|
|
__entry->len = ei->len;
|
|
|
|
__entry->age = ei->age;
|
|
|
|
__entry->blocks = ei->last_blocks;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
|
|
|
"age_ext_info(fofs: %u, len: %u, age: %llu, blocks: %llu)",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs,
|
|
|
|
__entry->fofs,
|
|
|
|
__entry->len,
|
|
|
|
__entry->age,
|
|
|
|
__entry->blocks)
|
|
|
|
);
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TRACE_EVENT(f2fs_update_read_extent_tree_range,
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs, unsigned int len,
|
|
|
|
block_t blkaddr,
|
2022-09-19 14:57:09 +03:00
|
|
|
unsigned int c_len),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_ARGS(inode, pgofs, len, blkaddr, c_len),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
__field(u32, blk)
|
2015-09-06 12:50:13 +03:00
|
|
|
__field(unsigned int, len)
|
2022-09-19 14:57:09 +03:00
|
|
|
__field(unsigned int, c_len)
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
2015-09-06 12:50:13 +03:00
|
|
|
__entry->len = len;
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->blk = blkaddr;
|
2022-09-19 14:57:09 +03:00
|
|
|
__entry->c_len = c_len;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
2015-09-06 12:50:13 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
2022-11-30 20:26:29 +03:00
|
|
|
"len = %u, blkaddr = %u, c_len = %u",
|
2015-02-05 12:59:59 +03:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs,
|
2022-09-19 14:57:09 +03:00
|
|
|
__entry->len,
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->blk,
|
2022-09-19 14:57:09 +03:00
|
|
|
__entry->c_len)
|
2015-02-05 12:59:59 +03:00
|
|
|
);
|
|
|
|
|
2022-12-02 04:37:15 +03:00
|
|
|
TRACE_EVENT(f2fs_update_age_extent_tree_range,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs, unsigned int len,
|
|
|
|
unsigned long long age,
|
|
|
|
unsigned long long last_blks),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pgofs, len, age, last_blks),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
__field(unsigned long long, age)
|
|
|
|
__field(unsigned long long, blocks)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->age = age;
|
|
|
|
__entry->blocks = last_blks;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
|
|
|
"len = %u, age = %llu, blocks = %llu",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs,
|
|
|
|
__entry->len,
|
|
|
|
__entry->age,
|
|
|
|
__entry->blocks)
|
|
|
|
);
|
|
|
|
|
2015-02-05 12:59:59 +03:00
|
|
|
TRACE_EVENT(f2fs_shrink_extent_tree,
|
|
|
|
|
|
|
|
TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt,
|
2022-11-30 20:26:29 +03:00
|
|
|
unsigned int tree_cnt, enum extent_type type),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_ARGS(sbi, node_cnt, tree_cnt, type),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(unsigned int, node_cnt)
|
|
|
|
__field(unsigned int, tree_cnt)
|
2022-11-30 20:26:29 +03:00
|
|
|
__field(enum extent_type, type)
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sbi->sb->s_dev;
|
|
|
|
__entry->node_cnt = node_cnt;
|
|
|
|
__entry->tree_cnt = tree_cnt;
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->type = type;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u, type = %s",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2015-02-05 12:59:59 +03:00
|
|
|
__entry->node_cnt,
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->tree_cnt,
|
2022-12-02 04:37:15 +03:00
|
|
|
show_extent_type(__entry->type))
|
2015-02-05 12:59:59 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_destroy_extent_tree,
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_PROTO(struct inode *inode, unsigned int node_cnt,
|
|
|
|
enum extent_type type),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_ARGS(inode, node_cnt, type),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, node_cnt)
|
2022-11-30 20:26:29 +03:00
|
|
|
__field(enum extent_type, type)
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->node_cnt = node_cnt;
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->type = type;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
2022-11-30 20:26:29 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u, type = %s",
|
2015-02-05 12:59:59 +03:00
|
|
|
show_dev_ino(__entry),
|
2022-11-30 20:26:29 +03:00
|
|
|
__entry->node_cnt,
|
2022-12-02 04:37:15 +03:00
|
|
|
show_extent_type(__entry->type))
|
2015-02-05 12:59:59 +03:00
|
|
|
);
|
|
|
|
|
2015-12-17 12:17:16 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs_sync_dirty_inodes,
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, s64 count),
|
2015-12-17 12:17:16 +03:00
|
|
|
|
|
|
|
TP_ARGS(sb, type, count),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(int, type)
|
2016-05-13 22:36:58 +03:00
|
|
|
__field(s64, count)
|
2015-12-17 12:17:16 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->count = count;
|
|
|
|
),
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_printk("dev = (%d,%d), %s, dirty count = %lld",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2015-12-17 12:17:16 +03:00
|
|
|
show_file_type(__entry->type),
|
|
|
|
__entry->count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_enter,
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, s64 count),
|
2015-12-17 12:17:16 +03:00
|
|
|
|
|
|
|
TP_ARGS(sb, type, count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_exit,
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, s64 count),
|
2015-12-17 12:17:16 +03:00
|
|
|
|
|
|
|
TP_ARGS(sb, type, count)
|
|
|
|
);
|
|
|
|
|
2019-02-26 14:01:15 +03:00
|
|
|
TRACE_EVENT(f2fs_shutdown,
|
|
|
|
|
|
|
|
TP_PROTO(struct f2fs_sb_info *sbi, unsigned int mode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(sbi, mode, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(unsigned int, mode)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sbi->sb->s_dev;
|
|
|
|
__entry->mode = mode;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), mode: %s, ret:%d",
|
|
|
|
show_dev(__entry->dev),
|
|
|
|
show_shutdown_mode(__entry->mode),
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
f2fs: support data compression
This patch tries to support compression in f2fs.
- New term named cluster is defined as basic unit of compression, file can
be divided into multiple clusters logically. One cluster includes 4 << n
(n >= 0) logical pages, compression size is also cluster size, each of
cluster can be compressed or not.
- In cluster metadata layout, one special flag is used to indicate cluster
is compressed one or normal one, for compressed cluster, following metadata
maps cluster to [1, 4 << n - 1] physical blocks, in where f2fs stores
data including compress header and compressed data.
- In order to eliminate write amplification during overwrite, F2FS only
support compression on write-once file, data can be compressed only when
all logical blocks in file are valid and cluster compress ratio is lower
than specified threshold.
- To enable compression on regular inode, there are three ways:
* chattr +c file
* chattr +c dir; touch dir/file
* mount w/ -o compress_extension=ext; touch file.ext
Compress metadata layout:
[Dnode Structure]
+-----------------------------------------------+
| cluster 1 | cluster 2 | ......... | cluster N |
+-----------------------------------------------+
. . . .
. . . .
. Compressed Cluster . . Normal Cluster .
+----------+---------+---------+---------+ +---------+---------+---------+---------+
|compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 |
+----------+---------+---------+---------+ +---------+---------+---------+---------+
. .
. .
. .
+-------------+-------------+----------+----------------------------+
| data length | data chksum | reserved | compressed data |
+-------------+-------------+----------+----------------------------+
Changelog:
20190326:
- fix error handling of read_end_io().
- remove unneeded comments in f2fs_encrypt_one_page().
20190327:
- fix wrong use of f2fs_cluster_is_full() in f2fs_mpage_readpages().
- don't jump into loop directly to avoid uninitialized variables.
- add TODO tag in error path of f2fs_write_cache_pages().
20190328:
- fix wrong merge condition in f2fs_read_multi_pages().
- check compressed file in f2fs_post_read_required().
20190401
- allow overwrite on non-compressed cluster.
- check cluster meta before writing compressed data.
20190402
- don't preallocate blocks for compressed file.
- add lz4 compress algorithm
- process multiple post read works in one workqueue
Now f2fs supports processing post read work in multiple workqueue,
it shows low performance due to schedule overhead of multiple
workqueue executing orderly.
20190921
- compress: support buffered overwrite
C: compress cluster flag
V: valid block address
N: NEW_ADDR
One cluster contain 4 blocks
before overwrite after overwrite
- VVVV -> CVNN
- CVNN -> VVVV
- CVNN -> CVNN
- CVNN -> CVVV
- CVVV -> CVNN
- CVVV -> CVVV
20191029
- add kconfig F2FS_FS_COMPRESSION to isolate compression related
codes, add kconfig F2FS_FS_{LZO,LZ4} to cover backend algorithm.
note that: will remove lzo backend if Jaegeuk agreed that too.
- update codes according to Eric's comments.
20191101
- apply fixes from Jaegeuk
20191113
- apply fixes from Jaegeuk
- split workqueue for fsverity
20191216
- apply fixes from Jaegeuk
20200117
- fix to avoid NULL pointer dereference
[Jaegeuk Kim]
- add tracepoint for f2fs_{,de}compress_pages()
- fix many bugs and add some compression stats
- fix overwrite/mmap bugs
- address 32bit build error, reported by Geert.
- bug fixes when handling errors and i_compressed_blocks
Reported-by: <noreply@ellerman.id.au>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-11-01 13:07:14 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs_zip_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t cluster_idx,
|
|
|
|
unsigned int cluster_size, unsigned char algtype),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cluster_idx, cluster_size, algtype),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, idx)
|
|
|
|
__field(unsigned int, size)
|
|
|
|
__field(unsigned int, algtype)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->idx = cluster_idx;
|
|
|
|
__entry->size = cluster_size;
|
|
|
|
__entry->algtype = algtype;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, cluster_idx:%lu, "
|
|
|
|
"cluster_size = %u, algorithm = %s",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->idx,
|
|
|
|
__entry->size,
|
|
|
|
show_compress_algorithm(__entry->algtype))
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs_zip_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t cluster_idx,
|
|
|
|
unsigned int compressed_size, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cluster_idx, compressed_size, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, idx)
|
|
|
|
__field(unsigned int, size)
|
|
|
|
__field(unsigned int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->idx = cluster_idx;
|
|
|
|
__entry->size = compressed_size;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, cluster_idx:%lu, "
|
|
|
|
"compressed_size = %u, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->idx,
|
|
|
|
__entry->size,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_zip_start, f2fs_compress_pages_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t cluster_idx,
|
|
|
|
unsigned int cluster_size, unsigned char algtype),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cluster_idx, cluster_size, algtype)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_zip_start, f2fs_decompress_pages_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t cluster_idx,
|
|
|
|
unsigned int cluster_size, unsigned char algtype),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cluster_idx, cluster_size, algtype)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_zip_end, f2fs_compress_pages_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t cluster_idx,
|
|
|
|
unsigned int compressed_size, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cluster_idx, compressed_size, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_zip_end, f2fs_decompress_pages_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, pgoff_t cluster_idx,
|
|
|
|
unsigned int compressed_size, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, cluster_idx, compressed_size, ret)
|
|
|
|
);
|
|
|
|
|
2021-08-20 06:52:28 +03:00
|
|
|
#ifdef CONFIG_F2FS_IOSTAT
|
2020-03-30 06:30:59 +03:00
|
|
|
TRACE_EVENT(f2fs_iostat,
|
|
|
|
|
|
|
|
TP_PROTO(struct f2fs_sb_info *sbi, unsigned long long *iostat),
|
|
|
|
|
|
|
|
TP_ARGS(sbi, iostat),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(unsigned long long, app_dio)
|
|
|
|
__field(unsigned long long, app_bio)
|
|
|
|
__field(unsigned long long, app_wio)
|
|
|
|
__field(unsigned long long, app_mio)
|
2022-08-20 06:04:41 +03:00
|
|
|
__field(unsigned long long, app_bcdio)
|
|
|
|
__field(unsigned long long, app_mcdio)
|
2020-03-30 06:30:59 +03:00
|
|
|
__field(unsigned long long, fs_dio)
|
2022-08-20 06:04:41 +03:00
|
|
|
__field(unsigned long long, fs_cdio)
|
2020-03-30 06:30:59 +03:00
|
|
|
__field(unsigned long long, fs_nio)
|
|
|
|
__field(unsigned long long, fs_mio)
|
|
|
|
__field(unsigned long long, fs_gc_dio)
|
|
|
|
__field(unsigned long long, fs_gc_nio)
|
|
|
|
__field(unsigned long long, fs_cp_dio)
|
|
|
|
__field(unsigned long long, fs_cp_nio)
|
|
|
|
__field(unsigned long long, fs_cp_mio)
|
2020-04-16 13:16:56 +03:00
|
|
|
__field(unsigned long long, app_drio)
|
|
|
|
__field(unsigned long long, app_brio)
|
|
|
|
__field(unsigned long long, app_rio)
|
|
|
|
__field(unsigned long long, app_mrio)
|
2022-08-20 06:04:41 +03:00
|
|
|
__field(unsigned long long, app_bcrio)
|
|
|
|
__field(unsigned long long, app_mcrio)
|
2020-04-16 13:16:56 +03:00
|
|
|
__field(unsigned long long, fs_drio)
|
2020-04-23 13:03:06 +03:00
|
|
|
__field(unsigned long long, fs_gdrio)
|
|
|
|
__field(unsigned long long, fs_cdrio)
|
2020-04-16 13:16:56 +03:00
|
|
|
__field(unsigned long long, fs_nrio)
|
|
|
|
__field(unsigned long long, fs_mrio)
|
2020-03-30 06:30:59 +03:00
|
|
|
__field(unsigned long long, fs_discard)
|
2023-05-08 11:10:42 +03:00
|
|
|
__field(unsigned long long, fs_reset_zone)
|
2020-03-30 06:30:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sbi->sb->s_dev;
|
|
|
|
__entry->app_dio = iostat[APP_DIRECT_IO];
|
|
|
|
__entry->app_bio = iostat[APP_BUFFERED_IO];
|
|
|
|
__entry->app_wio = iostat[APP_WRITE_IO];
|
|
|
|
__entry->app_mio = iostat[APP_MAPPED_IO];
|
2022-08-20 06:04:41 +03:00
|
|
|
__entry->app_bcdio = iostat[APP_BUFFERED_CDATA_IO];
|
|
|
|
__entry->app_mcdio = iostat[APP_MAPPED_CDATA_IO];
|
2020-03-30 06:30:59 +03:00
|
|
|
__entry->fs_dio = iostat[FS_DATA_IO];
|
2022-08-20 06:04:41 +03:00
|
|
|
__entry->fs_cdio = iostat[FS_CDATA_IO];
|
2020-03-30 06:30:59 +03:00
|
|
|
__entry->fs_nio = iostat[FS_NODE_IO];
|
|
|
|
__entry->fs_mio = iostat[FS_META_IO];
|
|
|
|
__entry->fs_gc_dio = iostat[FS_GC_DATA_IO];
|
|
|
|
__entry->fs_gc_nio = iostat[FS_GC_NODE_IO];
|
|
|
|
__entry->fs_cp_dio = iostat[FS_CP_DATA_IO];
|
|
|
|
__entry->fs_cp_nio = iostat[FS_CP_NODE_IO];
|
|
|
|
__entry->fs_cp_mio = iostat[FS_CP_META_IO];
|
2020-04-16 13:16:56 +03:00
|
|
|
__entry->app_drio = iostat[APP_DIRECT_READ_IO];
|
|
|
|
__entry->app_brio = iostat[APP_BUFFERED_READ_IO];
|
|
|
|
__entry->app_rio = iostat[APP_READ_IO];
|
|
|
|
__entry->app_mrio = iostat[APP_MAPPED_READ_IO];
|
2022-08-20 06:04:41 +03:00
|
|
|
__entry->app_bcrio = iostat[APP_BUFFERED_CDATA_READ_IO];
|
|
|
|
__entry->app_mcrio = iostat[APP_MAPPED_CDATA_READ_IO];
|
2020-04-16 13:16:56 +03:00
|
|
|
__entry->fs_drio = iostat[FS_DATA_READ_IO];
|
2020-04-23 13:03:06 +03:00
|
|
|
__entry->fs_gdrio = iostat[FS_GDATA_READ_IO];
|
|
|
|
__entry->fs_cdrio = iostat[FS_CDATA_READ_IO];
|
2020-04-16 13:16:56 +03:00
|
|
|
__entry->fs_nrio = iostat[FS_NODE_READ_IO];
|
|
|
|
__entry->fs_mrio = iostat[FS_META_READ_IO];
|
2022-12-21 22:19:32 +03:00
|
|
|
__entry->fs_discard = iostat[FS_DISCARD_IO];
|
2023-05-08 11:10:42 +03:00
|
|
|
__entry->fs_reset_zone = iostat[FS_ZONE_RESET_IO];
|
2020-03-30 06:30:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), "
|
2022-08-20 06:04:41 +03:00
|
|
|
"app [write=%llu (direct=%llu, buffered=%llu), mapped=%llu, "
|
|
|
|
"compr(buffered=%llu, mapped=%llu)], "
|
2023-05-08 11:10:42 +03:00
|
|
|
"fs [data=%llu, cdata=%llu, node=%llu, meta=%llu, discard=%llu, "
|
|
|
|
"reset_zone=%llu], "
|
2020-03-30 06:30:59 +03:00
|
|
|
"gc [data=%llu, node=%llu], "
|
2020-04-16 13:16:56 +03:00
|
|
|
"cp [data=%llu, node=%llu, meta=%llu], "
|
|
|
|
"app [read=%llu (direct=%llu, buffered=%llu), mapped=%llu], "
|
2022-08-20 06:04:41 +03:00
|
|
|
"compr(buffered=%llu, mapped=%llu)], "
|
|
|
|
"fs [data=%llu, (gc_data=%llu, cdata=%llu), "
|
2020-04-23 13:03:06 +03:00
|
|
|
"node=%llu, meta=%llu]",
|
2020-03-30 06:30:59 +03:00
|
|
|
show_dev(__entry->dev), __entry->app_wio, __entry->app_dio,
|
2022-08-20 06:04:41 +03:00
|
|
|
__entry->app_bio, __entry->app_mio, __entry->app_bcdio,
|
|
|
|
__entry->app_mcdio, __entry->fs_dio, __entry->fs_cdio,
|
2020-03-30 06:30:59 +03:00
|
|
|
__entry->fs_nio, __entry->fs_mio, __entry->fs_discard,
|
2023-05-08 11:10:42 +03:00
|
|
|
__entry->fs_reset_zone,
|
2020-03-30 06:30:59 +03:00
|
|
|
__entry->fs_gc_dio, __entry->fs_gc_nio, __entry->fs_cp_dio,
|
2020-04-16 13:16:56 +03:00
|
|
|
__entry->fs_cp_nio, __entry->fs_cp_mio,
|
|
|
|
__entry->app_rio, __entry->app_drio, __entry->app_brio,
|
2022-08-20 06:04:41 +03:00
|
|
|
__entry->app_mrio, __entry->app_bcrio, __entry->app_mcrio,
|
|
|
|
__entry->fs_drio, __entry->fs_gdrio,
|
2020-04-23 13:03:06 +03:00
|
|
|
__entry->fs_cdrio, __entry->fs_nrio, __entry->fs_mrio)
|
2020-03-30 06:30:59 +03:00
|
|
|
);
|
f2fs: introduce periodic iostat io latency traces
Whenever we notice some sluggish issues on our machines, we are always
curious about how well all types of I/O in the f2fs filesystem are
handled. But, it's hard to get this kind of real data. First of all,
we need to reproduce the issue while turning on the profiling tool like
blktrace, but the issue doesn't happen again easily. Second, with the
intervention of any tools, the overall timing of the issue will be
slightly changed and it sometimes makes us hard to figure it out.
So, I added the feature printing out IO latency statistics tracepoint
events, which are minimal things to understand filesystem's I/O related
behaviors, into F2FS_IOSTAT kernel config. With "iostat_enable" sysfs
node on, we can get this statistics info in a periodic way and it
would cause the least overhead.
[samples]
f2fs_ckpt-254:1-507 [003] .... 2842.439683: f2fs_iostat_latency:
dev = (254,11), iotype [peak lat.(ms)/avg lat.(ms)/count],
rd_data [136/1/801], rd_node [136/1/1704], rd_meta [4/2/4],
wr_sync_data [164/16/3331], wr_sync_node [152/3/648],
wr_sync_meta [160/2/4243], wr_async_data [24/13/15],
wr_async_node [0/0/0], wr_async_meta [0/0/0]
f2fs_ckpt-254:1-507 [002] .... 2845.450514: f2fs_iostat_latency:
dev = (254,11), iotype [peak lat.(ms)/avg lat.(ms)/count],
rd_data [60/3/456], rd_node [60/3/1258], rd_meta [0/0/1],
wr_sync_data [120/12/2285], wr_sync_node [88/5/428],
wr_sync_meta [52/6/2990], wr_async_data [4/1/3],
wr_async_node [0/0/0], wr_async_meta [0/0/0]
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-08-21 01:29:09 +03:00
|
|
|
|
|
|
|
#ifndef __F2FS_IOSTAT_LATENCY_TYPE
|
|
|
|
#define __F2FS_IOSTAT_LATENCY_TYPE
|
|
|
|
struct f2fs_iostat_latency {
|
|
|
|
unsigned int peak_lat;
|
|
|
|
unsigned int avg_lat;
|
|
|
|
unsigned int cnt;
|
|
|
|
};
|
|
|
|
#endif /* __F2FS_IOSTAT_LATENCY_TYPE */
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_iostat_latency,
|
|
|
|
|
|
|
|
TP_PROTO(struct f2fs_sb_info *sbi, struct f2fs_iostat_latency (*iostat_lat)[NR_PAGE_TYPE]),
|
|
|
|
|
|
|
|
TP_ARGS(sbi, iostat_lat),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(unsigned int, d_rd_peak)
|
|
|
|
__field(unsigned int, d_rd_avg)
|
|
|
|
__field(unsigned int, d_rd_cnt)
|
|
|
|
__field(unsigned int, n_rd_peak)
|
|
|
|
__field(unsigned int, n_rd_avg)
|
|
|
|
__field(unsigned int, n_rd_cnt)
|
|
|
|
__field(unsigned int, m_rd_peak)
|
|
|
|
__field(unsigned int, m_rd_avg)
|
|
|
|
__field(unsigned int, m_rd_cnt)
|
|
|
|
__field(unsigned int, d_wr_s_peak)
|
|
|
|
__field(unsigned int, d_wr_s_avg)
|
|
|
|
__field(unsigned int, d_wr_s_cnt)
|
|
|
|
__field(unsigned int, n_wr_s_peak)
|
|
|
|
__field(unsigned int, n_wr_s_avg)
|
|
|
|
__field(unsigned int, n_wr_s_cnt)
|
|
|
|
__field(unsigned int, m_wr_s_peak)
|
|
|
|
__field(unsigned int, m_wr_s_avg)
|
|
|
|
__field(unsigned int, m_wr_s_cnt)
|
|
|
|
__field(unsigned int, d_wr_as_peak)
|
|
|
|
__field(unsigned int, d_wr_as_avg)
|
|
|
|
__field(unsigned int, d_wr_as_cnt)
|
|
|
|
__field(unsigned int, n_wr_as_peak)
|
|
|
|
__field(unsigned int, n_wr_as_avg)
|
|
|
|
__field(unsigned int, n_wr_as_cnt)
|
|
|
|
__field(unsigned int, m_wr_as_peak)
|
|
|
|
__field(unsigned int, m_wr_as_avg)
|
|
|
|
__field(unsigned int, m_wr_as_cnt)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sbi->sb->s_dev;
|
2023-02-01 13:47:02 +03:00
|
|
|
__entry->d_rd_peak = iostat_lat[READ_IO][DATA].peak_lat;
|
|
|
|
__entry->d_rd_avg = iostat_lat[READ_IO][DATA].avg_lat;
|
|
|
|
__entry->d_rd_cnt = iostat_lat[READ_IO][DATA].cnt;
|
|
|
|
__entry->n_rd_peak = iostat_lat[READ_IO][NODE].peak_lat;
|
|
|
|
__entry->n_rd_avg = iostat_lat[READ_IO][NODE].avg_lat;
|
|
|
|
__entry->n_rd_cnt = iostat_lat[READ_IO][NODE].cnt;
|
|
|
|
__entry->m_rd_peak = iostat_lat[READ_IO][META].peak_lat;
|
|
|
|
__entry->m_rd_avg = iostat_lat[READ_IO][META].avg_lat;
|
|
|
|
__entry->m_rd_cnt = iostat_lat[READ_IO][META].cnt;
|
|
|
|
__entry->d_wr_s_peak = iostat_lat[WRITE_SYNC_IO][DATA].peak_lat;
|
|
|
|
__entry->d_wr_s_avg = iostat_lat[WRITE_SYNC_IO][DATA].avg_lat;
|
|
|
|
__entry->d_wr_s_cnt = iostat_lat[WRITE_SYNC_IO][DATA].cnt;
|
|
|
|
__entry->n_wr_s_peak = iostat_lat[WRITE_SYNC_IO][NODE].peak_lat;
|
|
|
|
__entry->n_wr_s_avg = iostat_lat[WRITE_SYNC_IO][NODE].avg_lat;
|
|
|
|
__entry->n_wr_s_cnt = iostat_lat[WRITE_SYNC_IO][NODE].cnt;
|
|
|
|
__entry->m_wr_s_peak = iostat_lat[WRITE_SYNC_IO][META].peak_lat;
|
|
|
|
__entry->m_wr_s_avg = iostat_lat[WRITE_SYNC_IO][META].avg_lat;
|
|
|
|
__entry->m_wr_s_cnt = iostat_lat[WRITE_SYNC_IO][META].cnt;
|
|
|
|
__entry->d_wr_as_peak = iostat_lat[WRITE_ASYNC_IO][DATA].peak_lat;
|
|
|
|
__entry->d_wr_as_avg = iostat_lat[WRITE_ASYNC_IO][DATA].avg_lat;
|
|
|
|
__entry->d_wr_as_cnt = iostat_lat[WRITE_ASYNC_IO][DATA].cnt;
|
|
|
|
__entry->n_wr_as_peak = iostat_lat[WRITE_ASYNC_IO][NODE].peak_lat;
|
|
|
|
__entry->n_wr_as_avg = iostat_lat[WRITE_ASYNC_IO][NODE].avg_lat;
|
|
|
|
__entry->n_wr_as_cnt = iostat_lat[WRITE_ASYNC_IO][NODE].cnt;
|
|
|
|
__entry->m_wr_as_peak = iostat_lat[WRITE_ASYNC_IO][META].peak_lat;
|
|
|
|
__entry->m_wr_as_avg = iostat_lat[WRITE_ASYNC_IO][META].avg_lat;
|
|
|
|
__entry->m_wr_as_cnt = iostat_lat[WRITE_ASYNC_IO][META].cnt;
|
f2fs: introduce periodic iostat io latency traces
Whenever we notice some sluggish issues on our machines, we are always
curious about how well all types of I/O in the f2fs filesystem are
handled. But, it's hard to get this kind of real data. First of all,
we need to reproduce the issue while turning on the profiling tool like
blktrace, but the issue doesn't happen again easily. Second, with the
intervention of any tools, the overall timing of the issue will be
slightly changed and it sometimes makes us hard to figure it out.
So, I added the feature printing out IO latency statistics tracepoint
events, which are minimal things to understand filesystem's I/O related
behaviors, into F2FS_IOSTAT kernel config. With "iostat_enable" sysfs
node on, we can get this statistics info in a periodic way and it
would cause the least overhead.
[samples]
f2fs_ckpt-254:1-507 [003] .... 2842.439683: f2fs_iostat_latency:
dev = (254,11), iotype [peak lat.(ms)/avg lat.(ms)/count],
rd_data [136/1/801], rd_node [136/1/1704], rd_meta [4/2/4],
wr_sync_data [164/16/3331], wr_sync_node [152/3/648],
wr_sync_meta [160/2/4243], wr_async_data [24/13/15],
wr_async_node [0/0/0], wr_async_meta [0/0/0]
f2fs_ckpt-254:1-507 [002] .... 2845.450514: f2fs_iostat_latency:
dev = (254,11), iotype [peak lat.(ms)/avg lat.(ms)/count],
rd_data [60/3/456], rd_node [60/3/1258], rd_meta [0/0/1],
wr_sync_data [120/12/2285], wr_sync_node [88/5/428],
wr_sync_meta [52/6/2990], wr_async_data [4/1/3],
wr_async_node [0/0/0], wr_async_meta [0/0/0]
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-08-21 01:29:09 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), "
|
|
|
|
"iotype [peak lat.(ms)/avg lat.(ms)/count], "
|
|
|
|
"rd_data [%u/%u/%u], rd_node [%u/%u/%u], rd_meta [%u/%u/%u], "
|
|
|
|
"wr_sync_data [%u/%u/%u], wr_sync_node [%u/%u/%u], "
|
|
|
|
"wr_sync_meta [%u/%u/%u], wr_async_data [%u/%u/%u], "
|
|
|
|
"wr_async_node [%u/%u/%u], wr_async_meta [%u/%u/%u]",
|
|
|
|
show_dev(__entry->dev),
|
|
|
|
__entry->d_rd_peak, __entry->d_rd_avg, __entry->d_rd_cnt,
|
|
|
|
__entry->n_rd_peak, __entry->n_rd_avg, __entry->n_rd_cnt,
|
|
|
|
__entry->m_rd_peak, __entry->m_rd_avg, __entry->m_rd_cnt,
|
|
|
|
__entry->d_wr_s_peak, __entry->d_wr_s_avg, __entry->d_wr_s_cnt,
|
|
|
|
__entry->n_wr_s_peak, __entry->n_wr_s_avg, __entry->n_wr_s_cnt,
|
|
|
|
__entry->m_wr_s_peak, __entry->m_wr_s_avg, __entry->m_wr_s_cnt,
|
|
|
|
__entry->d_wr_as_peak, __entry->d_wr_as_avg, __entry->d_wr_as_cnt,
|
|
|
|
__entry->n_wr_as_peak, __entry->n_wr_as_avg, __entry->n_wr_as_cnt,
|
|
|
|
__entry->m_wr_as_peak, __entry->m_wr_as_avg, __entry->m_wr_as_cnt)
|
|
|
|
);
|
2021-08-20 06:52:28 +03:00
|
|
|
#endif
|
2020-03-30 06:30:59 +03:00
|
|
|
|
2020-06-29 15:13:12 +03:00
|
|
|
TRACE_EVENT(f2fs_bmap,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, sector_t lblock, sector_t pblock),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblock, pblock),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(sector_t, lblock)
|
|
|
|
__field(sector_t, pblock)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->lblock = lblock;
|
|
|
|
__entry->pblock = pblock;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long long)__entry->lblock,
|
|
|
|
(unsigned long long)__entry->pblock)
|
|
|
|
);
|
|
|
|
|
2020-06-29 15:13:13 +03:00
|
|
|
TRACE_EVENT(f2fs_fiemap,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, sector_t lblock, sector_t pblock,
|
|
|
|
unsigned long long len, unsigned int flags, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblock, pblock, len, flags, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(sector_t, lblock)
|
|
|
|
__field(sector_t, pblock)
|
|
|
|
__field(unsigned long long, len)
|
|
|
|
__field(unsigned int, flags)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->lblock = lblock;
|
|
|
|
__entry->pblock = pblock;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->flags = flags;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld, "
|
|
|
|
"len:%llu, flags:%u, ret:%d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long long)__entry->lblock,
|
|
|
|
(unsigned long long)__entry->pblock,
|
|
|
|
__entry->len,
|
|
|
|
__entry->flags,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2022-03-22 01:13:06 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__rw_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, int bytes,
|
|
|
|
pid_t pid, char *pathname, char *command),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, bytes, pid, pathname, command),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__string(pathbuf, pathname)
|
|
|
|
__field(loff_t, offset)
|
|
|
|
__field(int, bytes)
|
|
|
|
__field(loff_t, i_size)
|
|
|
|
__string(cmdline, command)
|
|
|
|
__field(pid_t, pid)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
/*
|
|
|
|
* Replace the spaces in filenames and cmdlines
|
|
|
|
* because this screws up the tooling that parses
|
|
|
|
* the traces.
|
|
|
|
*/
|
|
|
|
__assign_str(pathbuf, pathname);
|
|
|
|
(void)strreplace(__get_str(pathbuf), ' ', '_');
|
|
|
|
__entry->offset = offset;
|
|
|
|
__entry->bytes = bytes;
|
|
|
|
__entry->i_size = i_size_read(inode);
|
|
|
|
__assign_str(cmdline, command);
|
|
|
|
(void)strreplace(__get_str(cmdline), ' ', '_');
|
|
|
|
__entry->pid = pid;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("entry_name %s, offset %llu, bytes %d, cmdline %s,"
|
|
|
|
" pid %d, i_size %llu, ino %lu",
|
|
|
|
__get_str(pathbuf), __entry->offset, __entry->bytes,
|
|
|
|
__get_str(cmdline), __entry->pid, __entry->i_size,
|
|
|
|
(unsigned long) __entry->ino)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__rw_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, bytes),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, offset)
|
|
|
|
__field(int, bytes)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->offset = offset;
|
|
|
|
__entry->bytes = bytes;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("ino %lu, offset %llu, bytes %d",
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->offset, __entry->bytes)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__rw_start, f2fs_dataread_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, int bytes,
|
|
|
|
pid_t pid, char *pathname, char *command),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, bytes, pid, pathname, command)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__rw_end, f2fs_dataread_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, bytes)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__rw_start, f2fs_datawrite_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, int bytes,
|
|
|
|
pid_t pid, char *pathname, char *command),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, bytes, pid, pathname, command)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__rw_end, f2fs_datawrite_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, bytes)
|
|
|
|
);
|
|
|
|
|
2013-04-19 20:28:40 +04:00
|
|
|
#endif /* _TRACE_F2FS_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|