linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2 v2] ext4: Fix ENOSPC handling for DAX faults
@ 2017-12-21 16:30 Jan Kara
  2017-12-21 16:30 ` [PATCH 1/2] dax: Pass detailed error code from dax_iomap_fault() Jan Kara
  2017-12-21 16:30 ` [PATCH 2/2] ext4: Fix ENOSPC handling in DAX page fault handler Jan Kara
  0 siblings, 2 replies; 11+ messages in thread
From: Jan Kara @ 2017-12-21 16:30 UTC (permalink / raw)
  To: linux-ext4
  Cc: Ted Tso, Ross Zwisler, Dan Williams, linux-fsdevel, linux-nvdimm,
	Jan Kara

Hello,

these two patches fix handling of ENOSPC during DAX faults. The problem is
that currently running transaction may be holding lots of already freed
blocks which can be reallocated only once the transaction commits. Standard
retry logic in ext4_iomap_end() does not work for DAX page fault handler
since we hold current transaction open in ext4_dax_huge_fault() and thus
retry logic cannot force the running transaction and as a result application
gets SIGBUS due to premature ENOSPC error.

Changes since v1:
* Made error passed back from dax_iomap_fault() explicitely be only the error
  from ->iomap_begin()

Comments are welcome.

								Honza

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/2 v3] ext4: Fix ENOSPC handling for DAX faults
@ 2018-01-03 10:08 Jan Kara
  2018-01-03 10:08 ` [PATCH 1/2] dax: Pass detailed error code from dax_iomap_fault() Jan Kara
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kara @ 2018-01-03 10:08 UTC (permalink / raw)
  To: Ted Tso
  Cc: linux-ext4, linux-fsdevel, linux-nvdimm, Ross Zwisler,
	Dan Williams, Jan Kara

Hello,

these two patches fix handling of ENOSPC during DAX faults. The problem is
that currently running transaction may be holding lots of already freed
blocks which can be reallocated only once the transaction commits. Standard
retry logic in ext4_iomap_end() does not work for DAX page fault handler
since we hold current transaction open in ext4_dax_huge_fault() and thus
retry logic cannot force the running transaction and as a result application
gets SIGBUS due to premature ENOSPC error.

Ted, can you please merge these patches through your tree? Ext4 is the part
that is touched by these patches the most.

Changes since v2:
* Added Reviewed-by tags

Changes since v1:
* Made error passed back from dax_iomap_fault() explicitely be only the error
  from ->iomap_begin()

Comments are welcome.

								Honza

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/2] ext4: Fix ENOSPC handling for DAX faults
@ 2017-12-13  9:13 Jan Kara
  2017-12-13  9:13 ` [PATCH 1/2] dax: Pass detailed error code from dax_iomap_fault() Jan Kara
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kara @ 2017-12-13  9:13 UTC (permalink / raw)
  To: linux-ext4
  Cc: Ted Tso, Ross Zwisler, Dan Williams, linux-fsdevel, linux-nvdimm,
	Jan Kara

Hello,

these two patches fix handling of ENOSPC during DAX faults. The problem is
that currently running transaction may be holding lots of already freed
blocks which can be reallocated only once the transaction commits. Standard
retry logic in ext4_iomap_end() does not work for DAX page fault handler
since we hold current transaction open in ext4_dax_huge_fault() and thus
retry logic cannot force the running transaction and as a result application
gets SIGBUS due to premature ENOSPC error.

These two patches fix the problem. I'm not too happy about patch 1/2 passing
additional info (error code) from the fault handler but I don't see an
easy better option since we want to also pass back special return values
like VM_FAULT_FALLBACK. Comments are welcome.

								Honza

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-01-07 21:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 16:30 [PATCH 0/2 v2] ext4: Fix ENOSPC handling for DAX faults Jan Kara
2017-12-21 16:30 ` [PATCH 1/2] dax: Pass detailed error code from dax_iomap_fault() Jan Kara
2017-12-21 17:12   ` Dan Williams
2018-01-02 18:54     ` Jan Kara
2018-01-02 18:57       ` Dan Williams
2017-12-21 17:16   ` Ross Zwisler
2017-12-21 16:30 ` [PATCH 2/2] ext4: Fix ENOSPC handling in DAX page fault handler Jan Kara
2017-12-21 17:17   ` Ross Zwisler
  -- strict thread matches above, loose matches on Subject: below --
2018-01-03 10:08 [PATCH 0/2 v3] ext4: Fix ENOSPC handling for DAX faults Jan Kara
2018-01-03 10:08 ` [PATCH 1/2] dax: Pass detailed error code from dax_iomap_fault() Jan Kara
2018-01-07 21:51   ` Theodore Ts'o
2017-12-13  9:13 [PATCH 0/2] ext4: Fix ENOSPC handling for DAX faults Jan Kara
2017-12-13  9:13 ` [PATCH 1/2] dax: Pass detailed error code from dax_iomap_fault() Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).