Fix loopback mounted filesystems on NFS
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | workqueue: Add a helper to identify current workqueueinclude/ kernel/ | +19 | 2 replies | |
| 2/2 | NFS: Improve nfsiod workqueue detection for allocation flagsfs/ | +11 | 8 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Jeff Layton | Laurence Oberman |
|---|---|---|
| Series | R-b | |
| 1/2 | ||
| 2/2 | T-b R-b T-b R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] Fix loopback mounted filesystems on NFS
We've been investigating new reports of filesystem corruption on loopback images on NFS clients. It appears that during writeback the loopback driver encounters allocation failures in NFS and fails to write dirty pages to the backing file.
We believe the problem is due to the loopback driver performing writeback from a workqueue (so PF_WQ_WORKER is set), however ever since work to improve NFS' memory allocation strategies [1] its possible that NFS incorrectly assumes that if PF_WQ_WORKER is set then the writeback context is nfsiod. To make things worse, NFS does not expect PF_WQ_WORKER to be set along with other PF_ flags such as PF_MEMALLOC_NOIO, but cannot really know (without checking them all) which other allocation flags are set should writeback be entered from a NFS-external workqueue worker.
To fix this, I'd like to introduce a way to check which specific workqueue is being served by a worker (in patch 1), so that NFS can ensure that it sets certain allocation flags only for the nfsiod workqueue workers (in patch 2).
[1]: https://lore.kernel.org/linux-nfs/[email protected]/
Benjamin Coddington (2):
workqueue: Add a helper to identify current workqueue
NFS: Improve nfsiod workqueue detection for allocation flags
fs/nfs/internal.h | 12 +++++++++++- include/linux/workqueue.h | 1 + kernel/workqueue.c | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.0