Thread (28 messages) 28 messages, 7 authors, 2021-02-25

Re: [PATCH 3/7] fsdax: Copy data before write

flat view

From: Christoph Hellwig <hch@lst.de>
Date: 2021-02-08 15:20:21
Also in: linux-fsdevel, linux-xfs, lkml, nvdimm, ocfs2-devel

quoted hunk ↗ jump to hunk
 	switch (iomap.type) {
 	case IOMAP_MAPPED:
+cow:
 		if (iomap.flags & IOMAP_F_NEW) {
 			count_vm_event(PGMAJFAULT);
 			count_memcg_event_mm(vma->vm_mm, PGMAJFAULT);
 			major = VM_FAULT_MAJOR;
 		}
 		error = dax_iomap_direct_access(&iomap, pos, PAGE_SIZE,
-						NULL, &pfn);
+						&kaddr, &pfn);
Any chance you could look into factoring out this code into a helper
to avoid the goto magic, which is a little too convoluted?
quoted hunk ↗ jump to hunk
 	switch (iomap.type) {
 	case IOMAP_MAPPED:
+cow:
 		error = dax_iomap_direct_access(&iomap, pos, PMD_SIZE,
-						NULL, &pfn);
+						&kaddr, &pfn);
 		if (error < 0)
 			goto finish_iomap;
 
 		entry = dax_insert_entry(&xas, mapping, vmf, entry, pfn,
 						DAX_PMD, write && !sync);
 
+		if (srcmap.type != IOMAP_HOLE) {
Same here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help