summaryrefslogtreecommitdiff
path: root/trafgen_dev.c
diff options
context:
space:
mode:
authorNick Grauel <nicolas.grauel@plexxi.com>2018-05-30 23:42:15 -0400
committerTobias Klauser <tklauser@distanz.ch>2018-05-31 16:38:01 +0200
commit3f26829394ea6cece4db3bae9ea0ce456c3f7ce9 (patch)
treee38f79d6a7b1dd8bd8a461ac43f342c2ead139f1 /trafgen_dev.c
parentf8665d43b8e1e33a92b7529d49e3e8c8b1c3c586 (diff)
mausezahn: Restore handling of raw hex string passed in on command line
Originally all hex strings (whether they were given on the command line or in a file) were handled by a call to str2hex(): bytestring_s = str2hex (tx.arg_string, bytestring, MAX_PAYLOAD_SIZE); Commit f634c74 added code to parse out "payload=" or "p=" flags that may have been added at the start of the hex string. This code also changed the logic around this str2hex() call to only call the function and populate bytestring_s if one of these flags was found. This broke the ability to pass in a raw hex string on the command line since it fails the check and bytestring_s is never populated with the hex bytes. I've added an else condition to make the str2hex() call using the old method in cases where no "payload=" or "p=" flags are found. Signed-off-by: Nick Grauel <nicolas.grauel@plexxi.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_dev.c')
0 files changed, 0 insertions, 0 deletions
on disk obtained from an extent map before the relocation started btrfs_wait_ordered_range() --> writes all the pages read before to disk (belonging to the relocation inode) relocation finishes bio completes and wrote new data to the old location of the block group So fix this by tracking the number of nocow writers for a block group and make sure relocation waits for that number to go down to 0 before starting to move the extents. The same race can also happen with buffered writes in nocow mode since the patch I recently made titled "Btrfs: don't do unnecessary delalloc flushes when relocating", because we are no longer flushing all delalloc which served as a synchonization mechanism (due to page locking) and ensured the ordered extents for nocow buffered writes were created before we called btrfs_wait_ordered_roots(). The race with direct IO writes in nocow mode existed before that patch (no pages are locked or used during direct IO) and that fixed only races with direct IO writes that do cow. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com>
Diffstat