Skip to content

fix INT_MAX readdir hang, plus cleanups

Zach Brown linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: set readdir f_pos only after filldirfs/btrfs/delayed-inode.c fs/btrfs/inode.c+10 -121 reply
2/6btrfs: fix readdir hang with offsets past INT_MAXfs/btrfs/inode.c+16 -80 replies
3/6btrfs: trivial delayed item readdir list cleanupsfs/btrfs/delayed-inode.c fs/btrfs/delayed-inode.h fs/btrfs/inode.c+9 -280 replies
4/6btrfs: simplify finding next/prev delayed itemsfs/btrfs/delayed-inode.c+21 -330 replies
5/6btrfs: add helper to get delayed item rootfs/btrfs/delayed-inode.c+13 -150 replies
6/6btrfs: get fewer delayed item refs during readdirfs/btrfs/delayed-inode.c fs/btrfs/delayed-inode.h fs/btrfs/inode.c+23 -160 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchMiao Xie
1/6R-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] fix INT_MAX readdir hang, plus cleanups

Hi gang,

I finally sat down to fix that readdir hang that has been in the back of my mind for a while. I *hope* that the fix is pretty simple: just don't manufacture a fake f_pos, I *think* we can abuse f_version as an indicator that we shouldn't return entries. Does this look reasonable?

We still have the problem that we can generate valid large f_pos values that can confuse 32bit userspace, but that's a different problem. I think we'll want filldir generation of EOVERFLOW like what exists for large inodes.

The rest of the patches are cleanups that I saw when absorbing the code. It's all lightly tested with xfstests but it wouldn't surprise me if I missed something so review is appreciated.

Thanks!

- z