On Tue, Oct 10, 2017 at 6:09 PM, Dave Chinner wrote:
> On Tue, Oct 10, 2017 at 07:49:30AM -0700, Dan Williams wrote:
>> @@ -1009,6 +1019,22 @@ xfs_file_llseek(
>> }
>>
>> /*
>> + * MAP_DIRECT faults can only be serviced while the FL_LAYOUT lease is
>> + * valid. See
On Tue, Oct 10, 2017 at 5:46 PM, Dave Chinner wrote:
> On Tue, Oct 10, 2017 at 07:49:17AM -0700, Dan Williams wrote:
>> Move xfs_break_layouts() to its own compilation unit so that it can be
>> used for both pnfs layouts and MAP_DIRECT mappings.
> .
>> diff --git
On Tue, Oct 10, 2017 at 07:49:30AM -0700, Dan Williams wrote:
> @@ -1009,6 +1019,22 @@ xfs_file_llseek(
> }
>
> /*
> + * MAP_DIRECT faults can only be serviced while the FL_LAYOUT lease is
> + * valid. See map_direct_invalidate.
> + */
> +static int
> +xfs_can_fault_direct(
> + struct
On Tue, Oct 10, 2017 at 07:49:17AM -0700, Dan Williams wrote:
> Move xfs_break_layouts() to its own compilation unit so that it can be
> used for both pnfs layouts and MAP_DIRECT mappings.
.
> diff --git a/fs/xfs/xfs_pnfs.h b/fs/xfs/xfs_pnfs.h
> index b587cb99b2b7..4135b2482697 100644
> ---
On Tue, Oct 10, 2017 at 12:44 PM, Andrew Morton
wrote:
>
> This is all pretty mature code (isn't it?). Any idea why this bug
> popped up now?
Also, while the patch looks sane, the
clean_buffers(page, PAGE_SIZE);
line really threw me. That's an insane value
On Tue, Oct 10, 2017 at 11:05 AM, Jason Gunthorpe
wrote:
> On Tue, Oct 10, 2017 at 10:39:27AM -0700, Dan Williams wrote:
>> On Tue, Oct 10, 2017 at 10:25 AM, Jason Gunthorpe
>
>> >> Have a look at the patch [1], I don't touch the ODP path.
>> >
>> > But, does ODP
On Fri, 6 Oct 2017 14:15:41 -0700 Matthew Wilcox wrote:
> When using FAT on a block device which supports rw_page, we can hit
> BUG_ON(!PageLocked(page)) in try_to_free_buffers(). This is because we
> call clean_buffers() after unlocking the page we've written. Introduce a
On Tue, Oct 10, 2017 at 10:39:27AM -0700, Dan Williams wrote:
> On Tue, Oct 10, 2017 at 10:25 AM, Jason Gunthorpe
> >> Have a look at the patch [1], I don't touch the ODP path.
> >
> > But, does ODP work OK already? I'm not clear on that..
>
> It had better. If the mapping is invalidated I would
On Mon, Oct 09, 2017 at 12:28:29PM -0700, Dan Williams wrote:
> > I don't think this has ever come up in the context of an all-device MR
> > invalidate requirement. Drivers already have code to invalidate
> > specifc MRs, but to find all MRs that touch certain pages and then
> > invalidate them
Provide a mock dma_get_iommu_domain() for the ibverbs core. Enable
ib_umem_get() to satisfy its DAX safety checks for a controlled test.
Signed-off-by: Dan Williams
---
tools/testing/nvdimm/Kbuild | 31 +++
The only event that will break a lease_direct lease in the device-dax
case is the device shutdown path where the physical pages might get
assigned to another device.
Cc: Jan Kara
Cc: Jeff Moyer
Cc: Christoph Hellwig
Cc: Ross Zwisler
iommu_sg_num_pages() is a helper that walks a scattlerlist and counts
pages taking segment boundaries and iommu_num_pages() into account.
Up-level it for determining the IOVA range that dma_map_ops established
at dma_map_sg() time. The intent is to iommu_unmap() the IOVA range in
advance of
Add a dma-mapping api helper to retrieve the generic iommu_domain for a
device. The motivation for this interface is making RDMA transfers to
DAX mappings safe. If the DAX file's block map changes we need to be to
reliably stop accesses to blocks that have been freed or re-assigned to
a new file.
Use the common helper for accounting the size of the IOVA range for a
scatterlist so that iommu and dma apis agree on the size of a
scatterlist. This is in support for using iommu_unmap() in advance of
dma_unmap_sg() to invalidate an io-mapping in advance of the IOVA range
being deallocated.
Provide a vma operation that registers a lease that is broken by
break_layout(). This is motivated by a need to stop in-progress RDMA
when the block-map of a DAX-file changes. I.e. since DAX gives
direct-access to filesystem blocks we can not allow those blocks to move
or change state while they
Introduce a set of helper apis for filesystems to establish FL_LAYOUT
leases to protect against writes and block map updates while a
MAP_DIRECT mapping is established. While the lease protects against the
syscall write path and fallocate it does not protect against allocating
write-faults, so this
MAP_DIRECT is an mmap(2) flag with the following semantics:
MAP_DIRECT
When specified with MAP_SHARED_VALIDATE, sets up a file lease with the
same lifetime as the mapping. Unlike a typical F_RDLCK lease this lease
is broken when a "lease breaker" attempts to write(2), change the block
A 'lease_direct' lease requires that the vma have a valid MAP_DIRECT
mapping established. For xfs we use the generic_map_direct_lease()
handler for ->lease_direct(). It establishes a new lease and then checks
if the MAP_DIRECT mapping has been broken. We want to be sure that the
process will
Move xfs_break_layouts() to its own compilation unit so that it can be
used for both pnfs layouts and MAP_DIRECT mappings.
Cc: Jan Kara
Cc: Jeff Moyer
Cc: Christoph Hellwig
Cc: Dave Chinner
Cc: "Darrick J. Wong"
In preparation for using FL_LAYOUT leases to allow coordination between
the kernel and processes doing userspace flushes / RDMA with DAX
mappings, add this helper that can be used to detect when block-map
updates are not allowed.
This is targeted to be used in an ->iomap_begin() implementation
The mmap(2) syscall suffers from the ABI anti-pattern of not validating
unknown flags. However, proposals like MAP_SYNC and MAP_DIRECT need a
mechanism to define new behavior that is known to fail on older kernels
without the support. Define a new MAP_SHARED_VALIDATE flag pattern that
is
The MAP_DIRECT mechanism for mmap intends to use a file lease to prevent
block map changes while the file is mapped. It requires the fd to setup
an fasync_struct for signalling lease break events to the lease holder.
Cc: Jan Kara
Cc: Jeff Moyer
Cc: Christoph
Changes since v7 [1]:
* Fix IOVA reuse race by leaving the dma scatterlist mapped until
unregistration time. Use iommu_unmap() in ib_umem_lease_break() to
force-invalidate the ibverbs memory registration. (David Woodhouse)
* Introduce iomap_can_allocate() as a way to check if any layouts are
ã~EYNzf´ó)Á³#ËïªË§þq¬8ÐÃXÅr媻ýÉ_í¼Óv
/§ÅÛ£5§L±6,M²åÖ?ä«ñ[?IC,iȯl;;;áë«üU·Í;w²sÞ¸µÅJZí»?÷»RO¬0þ-ÐúÓoHhÆn9¥Qïf-ñÏKð©s4BÏu
Ø
uq¹äæò§·ëSRdÒH{\ÏCAóºâA&$Iþºä*2TîÊó±h¸Ã
}OçÌQÍÇ£¸é<_î ¡¬øCGf7
QeõªD^ÓsGëÊGCÎÀ¹xY©¨Ôø}gÖû!UØdi8ëdÀeu´âOª`A²Ú),àÛ÷²Ï0
dÖ!ßâR
On Mon, Oct 09, 2017 at 08:45:41AM -0700, Dan Williams wrote:
> On Mon, Oct 9, 2017 at 1:07 AM, Johannes Thumshirn wrote:
> > On Sat, Oct 07, 2017 at 08:14:42AM -0700, Dan Williams wrote:
> > [...]
> >
> >> +rxe_cfg stop
> >> +rxe_cfg start
> >> +if ! rxe_cfg status | grep -n
25 matches
Mail list logo