Skip to content

Properly protect the extent map

Joel Becker ocfs2-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ocfs2: Wrap access of directory allocations with ip_alloc_sem.fs/ocfs2/dir.c fs/ocfs2/inode.c+8 -10 replies
2/3ocfs2: Properly lock extent map size changes.fs/ocfs2/extent_map.c+50 -400 replies
3/3ocfs2: Local mounts should not truncate the extent map.fs/ocfs2/dlmglue.c+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Ocfs2-devel] [PATCH 0/3] Properly protect the extent map

The extent map code was seeing an error trip when inserting records. There is a sanity check ensuring that the new record is within the known size of the file - as known by the extent map. The problem was that the "known" size was smaller than expected, returning an error to the caller.

This is a lot easier to see in local mounts. It has only been rarely seen in clusters.

We have three "independant" problems.

1) We don't take ip_alloc_sem when touching directory allocations.
2) We don't lock em_clusters properly.
3) Local mounts race to ocfs2_extent_map_trunc() in ocfs2_meta_lock_update().

The patches that follow are against mainline. They have been tested against 1.2 with local mounts.

Patches (1) and (2) will be ported to the ocfs2 1.2 branch directly, and all three fixes will be pushed to mainline.

Joel

--

Life's Little Instruction Book #69

"Whistle"

[email protected]
http://ocala.cs.miami.edu/~jlbec