Displaying 20 results from an estimated 45 matches for "dax_synchron".
2019 Apr 04
2
[PATCH v4 5/5] xfs: disable map_sync for async flush
...NC))
> > > > return -EOPNOTSUPP;
> > > >
> > > > + /* We don't support synchronous mappings with DAX files if
> > > > + * dax_device is not synchronous.
> > > > + */
> > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > > + (vma->vm_flags & VM_SYNC))
> > > > + return -EOPNOTSUPP;
> > > > +
> > > > file_accessed(filp);
> > > > vma->vm_ops = &xfs_...
2019 Apr 04
2
[PATCH v4 5/5] xfs: disable map_sync for async flush
...NC))
> > > > return -EOPNOTSUPP;
> > > >
> > > > + /* We don't support synchronous mappings with DAX files if
> > > > + * dax_device is not synchronous.
> > > > + */
> > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > > + (vma->vm_flags & VM_SYNC))
> > > > + return -EOPNOTSUPP;
> > > > +
> > > > file_accessed(filp);
> > > > vma->vm_ops = &xfs_...
2019 Apr 10
1
[PATCH v5 4/6] dax: check synchronous mapping is supported
...6706a5ee9..4a2a60ffec86 100644
> --- a/include/linux/dax.h
> +++ b/include/linux/dax.h
> @@ -38,6 +38,24 @@ void kill_dax(struct dax_device *dax_dev);
> void dax_write_cache(struct dax_device *dax_dev, bool wc);
> bool dax_write_cache_enabled(struct dax_device *dax_dev);
> bool dax_synchronous(struct dax_device *dax_dev);
> +
> +/*
> + * Callers check if synchronous mapping is enabled for DAX file
> + * and attached dax device is also synchronous.
> + *
> + * dax_synchronous function verifies if dax device is synchronous.
> + * Currently, only virtio pmem device s...
2019 Apr 04
2
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...t; > > > > >
> > > > > > + /* We don't support synchronous mappings with DAX files if
> > > > > > + * dax_device is not synchronous.
> > > > > > + */
> > > > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > > > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > > > > + (vma->vm_flags & VM_SYNC))
> > > > > > + return -EOPNOTSUPP;
> > > > > > +
> > > > > > file_accessed(filp)...
2019 Apr 04
2
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...t; > > > > >
> > > > > > + /* We don't support synchronous mappings with DAX files if
> > > > > > + * dax_device is not synchronous.
> > > > > > + */
> > > > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > > > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > > > > + (vma->vm_flags & VM_SYNC))
> > > > > > + return -EOPNOTSUPP;
> > > > > > +
> > > > > > file_accessed(filp)...
2019 Apr 03
4
[PATCH v4 5/5] xfs: disable map_sync for async flush
...s_file_mmap(
> if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC))
> return -EOPNOTSUPP;
>
> + /* We don't support synchronous mappings with DAX files if
> + * dax_device is not synchronous.
> + */
> + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> + (vma->vm_flags & VM_SYNC))
> + return -EOPNOTSUPP;
> +
> file_accessed(filp);
> vma->vm_ops = &xfs_file_vm_ops;
> if (IS_DAX(file_inode(filp)))
All this ad hoc IS_DAX conditional logi...
2019 Apr 03
4
[PATCH v4 5/5] xfs: disable map_sync for async flush
...s_file_mmap(
> if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC))
> return -EOPNOTSUPP;
>
> + /* We don't support synchronous mappings with DAX files if
> + * dax_device is not synchronous.
> + */
> + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> + (vma->vm_flags & VM_SYNC))
> + return -EOPNOTSUPP;
> +
> file_accessed(filp);
> vma->vm_ops = &xfs_file_vm_ops;
> if (IS_DAX(file_inode(filp)))
All this ad hoc IS_DAX conditional logi...
2019 Apr 03
1
[PATCH v4 5/5] xfs: disable map_sync for async flush
...X(file_inode(filp)) && (vma->vm_flags & VM_SYNC))
> > return -EOPNOTSUPP;
> >
> > + /* We don't support synchronous mappings with DAX files if
> > + * dax_device is not synchronous.
> > + */
> > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > + (vma->vm_flags & VM_SYNC))
> > + return -EOPNOTSUPP;
> > +
> > file_accessed(filp);
> > vma->vm_ops = &xfs_file_vm_ops;
> > if (IS_DAX(file_inode(filp)))
>...
2019 Apr 04
0
[PATCH v4 5/5] xfs: disable map_sync for async flush
...return -EOPNOTSUPP;
> > > > >
> > > > > + /* We don't support synchronous mappings with DAX files if
> > > > > + * dax_device is not synchronous.
> > > > > + */
> > > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > > > + (vma->vm_flags & VM_SYNC))
> > > > > + return -EOPNOTSUPP;
> > > > > +
> > > > > file_accessed(filp);
> > > > >...
2019 Apr 04
0
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...t; >
> > > > > > > + /* We don't support synchronous mappings with DAX files if
> > > > > > > + * dax_device is not synchronous.
> > > > > > > + */
> > > > > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > > > > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > > > > > + (vma->vm_flags & VM_SYNC))
> > > > > > > + return -EOPNOTSUPP;
> > > > > > > +
> > > > > > &...
2019 Apr 10
0
[PATCH v5 4/6] dax: check synchronous mapping is supported
.../include/linux/dax.h
index b896706a5ee9..4a2a60ffec86 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -38,6 +38,24 @@ void kill_dax(struct dax_device *dax_dev);
void dax_write_cache(struct dax_device *dax_dev, bool wc);
bool dax_write_cache_enabled(struct dax_device *dax_dev);
bool dax_synchronous(struct dax_device *dax_dev);
+
+/*
+ * Callers check if synchronous mapping is enabled for DAX file
+ * and attached dax device is also synchronous.
+ *
+ * dax_synchronous function verifies if dax device is synchronous.
+ * Currently, only virtio pmem device supports asynchronous device
+ * flu...
2019 Apr 10
1
[PATCH v5 3/6] libnvdimm: add dax_dev sync flag
On Wed 10-04-19 09:38:23, Pankaj Gupta wrote:
> @@ -64,6 +65,10 @@ static inline bool dax_write_cache_enabled(struct dax_device *dax_dev)
> {
> return false;
> }
> +static inline bool dax_synchronous(struct dax_device *dax_dev)
> +{
> + return true;
> +}
Is there a need to define dax_synchronous() for !CONFIG_DAX? Because that
property of dax device is pretty much undefined and I don't see anything
needing to call it for !CONFIG_DAX...
Honza
--
Jan Kara <jack at su...
2019 Apr 10
0
[PATCH v5 3/6] libnvdimm: add dax_dev sync flag
...e whether dax_flush() calls the low level flush routine */
DAXDEV_WRITE_CACHE,
+ /* flag to check if device supports synchronous flush */
+ DAXDEV_SYNC,
};
/**
@@ -354,6 +356,12 @@ bool dax_write_cache_enabled(struct dax_device *dax_dev)
}
EXPORT_SYMBOL_GPL(dax_write_cache_enabled);
+bool dax_synchronous(struct dax_device *dax_dev)
+{
+ return test_bit(DAXDEV_SYNC, &dax_dev->flags);
+}
+EXPORT_SYMBOL_GPL(dax_synchronous);
+
bool dax_alive(struct dax_device *dax_dev)
{
lockdep_assert_held(&dax_srcu);
@@ -511,7 +519,7 @@ static void dax_add_host(struct dax_device *dax_dev, const cha...
2019 Apr 26
0
[PATCH v7 3/6] libnvdimm: add dax_dev sync flag
...e whether dax_flush() calls the low level flush routine */
DAXDEV_WRITE_CACHE,
+ /* flag to check if device supports synchronous flush */
+ DAXDEV_SYNC,
};
/**
@@ -354,6 +356,12 @@ bool dax_write_cache_enabled(struct dax_device *dax_dev)
}
EXPORT_SYMBOL_GPL(dax_write_cache_enabled);
+bool dax_synchronous(struct dax_device *dax_dev)
+{
+ return test_bit(DAXDEV_SYNC, &dax_dev->flags);
+}
+EXPORT_SYMBOL_GPL(dax_synchronous);
+
bool dax_alive(struct dax_device *dax_dev)
{
lockdep_assert_held(&dax_srcu);
@@ -511,7 +519,7 @@ static void dax_add_host(struct dax_device *dax_dev, const cha...
2019 May 10
0
[PATCH v8 3/6] libnvdimm: add dax_dev sync flag
...e whether dax_flush() calls the low level flush routine */
DAXDEV_WRITE_CACHE,
+ /* flag to check if device supports synchronous flush */
+ DAXDEV_SYNC,
};
/**
@@ -354,6 +356,12 @@ bool dax_write_cache_enabled(struct dax_device *dax_dev)
}
EXPORT_SYMBOL_GPL(dax_write_cache_enabled);
+bool dax_synchronous(struct dax_device *dax_dev)
+{
+ return test_bit(DAXDEV_SYNC, &dax_dev->flags);
+}
+EXPORT_SYMBOL_GPL(dax_synchronous);
+
bool dax_alive(struct dax_device *dax_dev)
{
lockdep_assert_held(&dax_srcu);
@@ -508,7 +516,7 @@ static void dax_add_host(struct dax_device *dax_dev, const cha...
2019 Apr 10
14
[PATCH v5 0/6] virtio pmem driver
...nputs to
confirm if this behaviour is ok or needs any change?
Changes from PATCH v4: [1]
- Factor out MAP_SYNC supported functionality to a common helper
[Dave, Darrick, Jan]
- Comment, indentation and virtqueue_kick failure handle - Yuval Shaia
Changes from PATCH v3: [2]
- Use generic dax_synchronous() helper to check for DAXDEV_SYNC
flag - [Dan, Darrick, Jan]
- Add 'is_nvdimm_async' function
- Document page cache side channel attacks implications &
countermeasures - [Dave Chinner, Michael]
Changes from PATCH v2:
- Disable MAP_SYNC for ext4 & XFS filesystems - [Dan]...
2019 Apr 04
0
[PATCH v4 5/5] xfs: disable map_sync for async flush
...(vma->vm_flags & VM_SYNC))
> > > return -EOPNOTSUPP;
> > >
> > > + /* We don't support synchronous mappings with DAX files if
> > > + * dax_device is not synchronous.
> > > + */
> > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > > + (vma->vm_flags & VM_SYNC))
> > > + return -EOPNOTSUPP;
> > > +
> > > file_accessed(filp);
> > > vma->vm_ops = &xfs_file_vm_ops;
> > >...
2019 Apr 04
0
[PATCH v4 5/5] xfs: disable map_sync for async flush
...X(file_inode(filp)) && (vma->vm_flags & VM_SYNC))
> > return -EOPNOTSUPP;
> >
> > + /* We don't support synchronous mappings with DAX files if
> > + * dax_device is not synchronous.
> > + */
> > + if (IS_DAX(file_inode(filp)) && !dax_synchronous(
> > + xfs_find_daxdev_for_inode(file_inode(filp))) &&
> > + (vma->vm_flags & VM_SYNC))
> > + return -EOPNOTSUPP;
> > +
> > file_accessed(filp);
> > vma->vm_ops = &xfs_file_vm_ops;
> > if (IS_DAX(file_inode(filp)))
>...
2019 Apr 23
0
[PATCH v6 4/6] dax: check synchronous mapping is supported
.../include/linux/dax.h
index c97fc0cc7167..41b4a5db6305 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -41,6 +41,18 @@ void kill_dax(struct dax_device *dax_dev);
void dax_write_cache(struct dax_device *dax_dev, bool wc);
bool dax_write_cache_enabled(struct dax_device *dax_dev);
bool dax_synchronous(struct dax_device *dax_dev);
+/*
+ * Check if given mapping is supported by the file / underlying device.
+ */
+static inline bool daxdev_mapping_supported(struct vm_area_struct *vma,
+ struct dax_device *dax_dev)
+{
+ if (!(vma->vm_flags & VM_SYNC))
+ return true;
+ if (!IS_DAX(file_...
2019 Apr 26
0
[PATCH v7 4/6] dax: check synchronous mapping is supported
.../include/linux/dax.h
index c97fc0cc7167..41b4a5db6305 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -41,6 +41,18 @@ void kill_dax(struct dax_device *dax_dev);
void dax_write_cache(struct dax_device *dax_dev, bool wc);
bool dax_write_cache_enabled(struct dax_device *dax_dev);
bool dax_synchronous(struct dax_device *dax_dev);
+/*
+ * Check if given mapping is supported by the file / underlying device.
+ */
+static inline bool daxdev_mapping_supported(struct vm_area_struct *vma,
+ struct dax_device *dax_dev)
+{
+ if (!(vma->vm_flags & VM_SYNC))
+ return true;
+ if (!IS_DAX(file_...