summaryrefslogtreecommitdiff
path: root/drivers/powercap/intel_rapl.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2014-03-28 17:07:27 -0400
committerChris Mason <clm@fb.com>2014-04-06 17:34:37 -0700
commita26e8c9f75b0bfd8cccc9e8f110737b136eb5994 (patch)
tree678d0c7e3611739b89ca851c868ab8892a70effa /drivers/powercap/intel_rapl.c
parent573a075567f0174551e2fad2a3164afd2af788f2 (diff)
Btrfs: don't clear uptodate if the eb is under IO
So I have an awful exercise script that will run snapshot, balance and send/receive in parallel. This sometimes would crash spectacularly and when it came back up the fs would be completely hosed. Turns out this is because of a bad interaction of balance and send/receive. Send will hold onto its entire path for the whole send, but its blocks could get relocated out from underneath it, and because it doesn't old tree locks theres nothing to keep this from happening. So it will go to read in a slot with an old transid, and we could have re-allocated this block for something else and it could have a completely different transid. But because we think it is invalid we clear uptodate and re-read in the block. If we do this before we actually write out the new block we could write back stale data to the fs, and boom we're screwed. Now we definitely need to fix this disconnect between send and balance, but we really really need to not allow ourselves to accidently read in stale data over new data. So make sure we check if the extent buffer is not under io before clearing uptodate, this will kick back EIO to the caller instead of reading in stale data and keep us from corrupting the fs. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'drivers/powercap/intel_rapl.c')
0 files changed, 0 insertions, 0 deletions