Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace logical addresses when operating on partition #78

Open
ksztyber opened this issue Aug 20, 2019 · 0 comments
Open

Trace logical addresses when operating on partition #78

ksztyber opened this issue Aug 20, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@ksztyber
Copy link

Trace the logical address instead of the physical one when operating on a partition of a device.
For instance, the logs below show a write to the first block within the /dev/nvme0n1p1 partition, while the traces (collected from the partition device, /dev/nvme0n1p1, not /dev/nvme0n1) indicate a write being sent to address 2048 (start of the /dev/nvme0n1p1 partition). It seems more logical to record the traces offset within the bounds of the partition if user specifies the partition as the device to be traced.

[root@iotrace iotrace]# fdisk -l /dev/nvme0n1

Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x3c1bcb0d

        Device Boot      Start         End      Blocks   Id  System
/dev/nvme0n1p1             256     7078143    28311552   83  Linux

[root@iotrace iotrace]# iotrace -S -d /dev/nvme0n1p1 &
[1] 58924
[root@iotrace iotrace]# dd if=/dev/zero of=/dev/nvme0n1p1 bs=4k count=1 seek=0 oflag=dsync
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000327407 s, 12.5 MB/s

[root@iotrace iotrace]# kill 58924
...
{
 "tracePath": "kernel/2019-08-20_05:41:32",
 "state": "COMPLETE",
 "sourceNode": {
  "node": [
   {
    "id": "kernel"
   }
  ]
 },
 "traceStartDateTime": "2019-08-20 05:41",
 "traceDuration": "7",
 "traceSize": 1,
 "tracedEvents": "61",
 "droppedEvents": "0",
 "queueCount": "36"
}

[root@iotrace iotrace]# iotrace --parse-trace --path kernel/2019-08-20_05:41:32 | grep Write
{"header":{"sid":"60473671","timestamp":"525077100448357"},"io":{"lba":"2048","len":8,"ioClass":1,"deviceId":"271581184","operation":"Write","flush":false,"fua":false}}
@mariuszbarczak mariuszbarczak added the enhancement New feature or request label Oct 15, 2019
@mariuszbarczak mariuszbarczak added this to the 19.9 milestone Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants