Ext 4 bug: potential data loss
Forum
  1. Forums
  2. General
  3. General Discussion
  1. bettinz
  2. Wednesday, 20 May 2015
  3.  Subscribe via email
Hello, I\'ve just read:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg886512.html

Currently it is possible to lose whole file system block worth of data
when we hit the specific interaction with unwritten and delayed extents
in status extent tree.

The problem is that when we ins ert delayed extent into extent status
tree the only way to get rid of it is when we write out delayed buffer.
However there is a limitation in the extent status tree implementation
so that when inserting unwritten extent should there be even a single
delayed block the whole unwritten extent would be marked as delayed.

At this point, there is no way to get rid of the delayed extents,
because there are no delayed buffers to write out. So when a we write
into said unwritten extent we will convert it to written, but it still
remains delayed.

When we try to write into that block later ext4_da_map_blocks() will set
the buffer new and delayed and map it to invalid block which causes
the rest of the block to be zeroed loosing already written data.

For now we can fix this by simply not allowing to se t delayed status on
written extent in the extent status tree. Also add WARN_ON() to make
sure that we notice if this happens in the future.



Can we expect any update tu CL Kernel in the near future? (We don\'t see an update to kernel since months)

Thank you
Rate this post:
  1. 20.05.2015 13:05:16
  2. # 1
Igor Seletskiy Accepted Answer
Posts: 1194
Joined: 09.02.2010
0
Votes
Undo
We will follow RHEL lead on that, as so far we had no customers complains about this issue, and we don\'t know how prevalent the issue is.
We might do it as a kernelcare patch for those who use it.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.