Re: [PATCH 4/7] xfs: buffered write failure should not truncate the page cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So, the whole scan for delalloc logic seems pretty generic, I think
it can an should be lifted to iomap, with
xfs_buffered_write_delalloc_punch provided as a callback.

As for the reuse of the seek hole / data helpers, and I'm not sure
this actually helps all that much, and certainly is not super
efficient.  I don't want you to directly talk into rewriting this
once again, but a simple

	while ((folio = find_get_entry(&xas, max, XA_PRESENT))) {
		if (xa_is_value(folio) || folio_test_uptodate(folio) ||
		    ops->is_partially_uptodate) {
			xas_pause(xas);
			rcu_read_unlock();
			folio_lock(folio);
			if (likely(folio->mapping == mapping) &&
			    folio_test_dirty(folio)) {
				// crop folio start / end by total range
				if (ops->is_partially_uptodate) {
					// find partial range
				}
				// add to or start new range
			}
			
		} else {
			// pause rcu unlock and submit previous range if
			// needed
		}

		// move to next folio with size magic etc
	}

	// submit pending range if it exists




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux