Displaying 20 results from an estimated 77 matches for "vm_file".
2011 Nov 29
3
[PATCH] fs: push file_update_time into ->page_mkwrite
.../fs/btrfs/inode.c b/fs/btrfs/inode.c
index e16215f..c272b91 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6313,6 +6313,7 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
}
ret = VM_FAULT_NOPAGE; /* make the VM retry the fault */
+ file_update_time(vma->vm_file);
again:
lock_page(page);
size = i_size_read(inode);
diff --git a/fs/buffer.c b/fs/buffer.c
index 1a80b04..c949a11 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2347,6 +2347,7 @@ int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
loff_t size;
int ret;
+ file_upda...
2013 Apr 06
1
[PATCH 3/4] fsfreeze: manage kill signal when sb_start_pagefault is called
...truct *vma, struct vm_fault *vmf)
u64 page_start;
u64 page_end;
- sb_start_pagefault(inode->i_sb);
+ ret = sb_start_pagefault(inode->i_sb);
+ if (ret)
+ return VM_FAULT_RETRY;
ret = btrfs_delalloc_reserve_space(inode, PAGE_CACHE_SIZE);
if (!ret) {
ret = file_update_time(vma->vm_file);
diff --git a/fs/buffer.c b/fs/buffer.c
index b4dcb34..6d3d2cc 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2383,7 +2383,9 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
int ret;
struct super_block *sb = file_inode(vma->vm_file)->i_sb;
- sb_start_pagefaul...
2016 Jun 30
1
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...inode = new_inode(sb);
> ..
> ..
> inode->i_mapping->a_ops = a_ops;
> d_instantiate(path.dentry, inode);
>
> return alloc_file(&path, FMODE_WRITE | FMODE_READ, f_op);
> }
>
> And in our driver, we can change vma->vm_file with new one.
>
> int test_mmap(struct file *filp, struct vm_area_structd *vma)
> {
> struct file *newfile = movable_inode_getfile("[test"],
> filep->f_op, &test_aops);
> vma->vm_file = newfile;
> ..
&...
2016 Jun 30
1
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...inode = new_inode(sb);
> ..
> ..
> inode->i_mapping->a_ops = a_ops;
> d_instantiate(path.dentry, inode);
>
> return alloc_file(&path, FMODE_WRITE | FMODE_READ, f_op);
> }
>
> And in our driver, we can change vma->vm_file with new one.
>
> int test_mmap(struct file *filp, struct vm_area_structd *vma)
> {
> struct file *newfile = movable_inode_getfile("[test"],
> filep->f_op, &test_aops);
> vma->vm_file = newfile;
> ..
&...
2019 Oct 29
2
[PATCH v2 12/15] drm/amdgpu: Call find_vma under mmap_sem
...; - goto out;
> + return -EFAULT;
> }
>
> - vma = find_vma(mm, start);
> - if (unlikely(!vma || start < vma->vm_start)) {
> - r = -EFAULT;
> - goto out;
> - }
> - if (unlikely((gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) &&
> - vma->vm_file)) {
> - r = -EPERM;
> - goto out;
> - }
> + mm = mirror->hmm->mmu_notifier.mm;
> + if (!mmget_not_zero(mm)) /* Happens during process shutdown */
This works because mirror->hmm->mmu_notifier holds an mmgrab reference
to the mm? So the MM will not just go away, but if...
2016 Jun 27
2
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
On 06/16/2016 11:07 AM, Minchan Kim wrote:
> On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote:
>> On 06/16/2016 05:56 AM, Minchan Kim wrote:
>>> On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote:
>>>> On 06/15/2016 08:02 AM, Minchan Kim wrote:
>>>>> Hi,
>>>>>
>>>>> On Mon, Jun 13, 2016 at
2016 Jun 27
2
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
On 06/16/2016 11:07 AM, Minchan Kim wrote:
> On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote:
>> On 06/16/2016 05:56 AM, Minchan Kim wrote:
>>> On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote:
>>>> On 06/15/2016 08:02 AM, Minchan Kim wrote:
>>>>> Hi,
>>>>>
>>>>> On Mon, Jun 13, 2016 at
2020 May 29
1
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...;
> #include <linux/vdpa.h>
> @@ -741,12 +742,70 @@ static int vhost_vdpa_release(struct inode *inode,
> struct file *filep)
> return 0;
> }
>
> +static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
> +{
> + struct vhost_vdpa *v = vmf->vma->vm_file->private_data;
> + struct vdpa_device *vdpa = v->vdpa;
> + const struct vdpa_config_ops *ops = vdpa->config;
> + struct vdpa_notification_area notify;
> + struct vm_area_struct *vma = vmf->vma;
> + u16 index = vma->vm_pgoff;
> +
> +...
2016 Jun 28
0
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...mnt = mntget(movable_inode_mnt);
inode = new_inode(sb);
..
..
inode->i_mapping->a_ops = a_ops;
d_instantiate(path.dentry, inode);
return alloc_file(&path, FMODE_WRITE | FMODE_READ, f_op);
}
And in our driver, we can change vma->vm_file with new one.
int test_mmap(struct file *filp, struct vm_area_structd *vma)
{
struct file *newfile = movable_inode_getfile("[test"],
filep->f_op, &test_aops);
vma->vm_file = newfile;
..
..
}
When I read mmap_regio...
2007 Apr 18
1
[patch 5/9] Guest page hinting: mlocked pages.
....6/mm/mlock.c linux-2.6-patched/mm/mlock.c
--- linux-2.6/mm/mlock.c 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6-patched/mm/mlock.c 2006-09-01 12:50:24.000000000 +0200
@@ -60,6 +60,8 @@ success:
*/
pages = (end - start) >> PAGE_SHIFT;
if (newflags & VM_LOCKED) {
+ if (vma->vm_file && vma->vm_file->f_mapping)
+ vma->vm_file->f_mapping->mlocked = 1;
pages = -pages;
if (!(newflags & VM_IO))
ret = make_pages_present(start, end);
diff -urpN linux-2.6/mm/page-discard.c linux-2.6-patched/mm/page-discard.c
--- linux-2.6/mm/page-discard.c 2006-0...
2007 Apr 18
1
[patch 5/9] Guest page hinting: mlocked pages.
....6/mm/mlock.c linux-2.6-patched/mm/mlock.c
--- linux-2.6/mm/mlock.c 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6-patched/mm/mlock.c 2006-09-01 12:50:24.000000000 +0200
@@ -60,6 +60,8 @@ success:
*/
pages = (end - start) >> PAGE_SHIFT;
if (newflags & VM_LOCKED) {
+ if (vma->vm_file && vma->vm_file->f_mapping)
+ vma->vm_file->f_mapping->mlocked = 1;
pages = -pages;
if (!(newflags & VM_IO))
ret = make_pages_present(start, end);
diff -urpN linux-2.6/mm/page-discard.c linux-2.6-patched/mm/page-discard.c
--- linux-2.6/mm/page-discard.c 2006-0...
2020 May 29
0
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...ude <linux/iommu.h>
#include <linux/uuid.h>
#include <linux/vdpa.h>
@@ -741,12 +742,70 @@ static int vhost_vdpa_release(struct inode *inode, struct file *filep)
return 0;
}
+static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
+{
+ struct vhost_vdpa *v = vmf->vma->vm_file->private_data;
+ struct vdpa_device *vdpa = v->vdpa;
+ const struct vdpa_config_ops *ops = vdpa->config;
+ struct vdpa_notification_area notify;
+ struct vm_area_struct *vma = vmf->vma;
+ u16 index = vma->vm_pgoff;
+
+ notify = ops->get_vq_notification(vdpa, index);
+
+ vma->vm...
2019 Oct 28
0
[PATCH v2 12/15] drm/amdgpu: Call find_vma under mmap_sem
...ot;Failed to get hmm_mirror\n");
- r = -EFAULT;
- goto out;
+ return -EFAULT;
}
- vma = find_vma(mm, start);
- if (unlikely(!vma || start < vma->vm_start)) {
- r = -EFAULT;
- goto out;
- }
- if (unlikely((gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) &&
- vma->vm_file)) {
- r = -EPERM;
- goto out;
- }
+ mm = mirror->hmm->mmu_notifier.mm;
+ if (!mmget_not_zero(mm)) /* Happens during process shutdown */
+ return -ESRCH;
range = kzalloc(sizeof(*range), GFP_KERNEL);
if (unlikely(!range)) {
@@ -847,6 +837,17 @@ int amdgpu_ttm_tt_get_user_pages(struct a...
2020 Jun 01
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...gprot_t' {aka 'struct <anonymous>'} from type 'int'
cc1: some warnings being treated as errors
vim +/pgprot_noncached +754 drivers/vhost/vdpa.c
742
743 static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
744 {
745 struct vhost_vdpa *v = vmf->vma->vm_file->private_data;
746 struct vdpa_device *vdpa = v->vdpa;
747 const struct vdpa_config_ops *ops = vdpa->config;
748 struct vdpa_notification_area notify;
749 struct vm_area_struct *vma = vmf->vma;
750 u16 index = vma->vm_pgoff;
751
752 notify = ops->get_vq...
2020 Jun 01
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...gprot_t' {aka 'struct <anonymous>'} from type 'int'
cc1: some warnings being treated as errors
vim +/pgprot_noncached +754 drivers/vhost/vdpa.c
742
743 static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
744 {
745 struct vhost_vdpa *v = vmf->vma->vm_file->private_data;
746 struct vdpa_device *vdpa = v->vdpa;
747 const struct vdpa_config_ops *ops = vdpa->config;
748 struct vdpa_notification_area notify;
749 struct vm_area_struct *vma = vmf->vma;
750 u16 index = vma->vm_pgoff;
751
752 notify = ops->get_vq...
2020 May 29
0
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...inux/vdpa.h>
>> @@ -741,12 +742,70 @@ static int vhost_vdpa_release(struct inode
>> *inode, struct file *filep)
>> ????? return 0;
>> ? }
>> ? +static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
>> +{
>> +??? struct vhost_vdpa *v = vmf->vma->vm_file->private_data;
>> +??? struct vdpa_device *vdpa = v->vdpa;
>> +??? const struct vdpa_config_ops *ops = vdpa->config;
>> +??? struct vdpa_notification_area notify;
>> +??? struct vm_area_struct *vma = vmf->vma;
>> +??? u16 index = vma->vm_pgoff;
>>...
2019 Apr 04
2
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...?
>
> So I would put the helper in include/linux/dax.h and have it like:
>
> 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_inode(vma->vm_file)))
> return false;
> return dax_synchronous(dax_dev);
> }
Sure. This is much better. I was also not sure what to name the helper function.
I will go ahead with this unless 'Dave' & 'Darrick' have anything to add.
Thank you very much.
Best regards,
Pankaj
>
&...
2019 Apr 04
2
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...?
>
> So I would put the helper in include/linux/dax.h and have it like:
>
> 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_inode(vma->vm_file)))
> return false;
> return dax_synchronous(dax_dev);
> }
Sure. This is much better. I was also not sure what to name the helper function.
I will go ahead with this unless 'Dave' & 'Darrick' have anything to add.
Thank you very much.
Best regards,
Pankaj
>
&...
2019 Apr 10
1
[PATCH v5 4/6] dax: check synchronous mapping is supported
...apping_supported(struct vm_area_struct *vma,
> + struct dax_device *dax_dev)
> +{
/* Everyone supports non-sync mappings */
> + if (!(vma->vm_flags & VM_SYNC))
> + return true;
/* Sync mappings are supported only for files using DAX */
> + if (!IS_DAX(file_inode(vma->vm_file)))
> + return false;
/* Underlying device must support persisting through CPU instructions */
> + return dax_synchronous(dax_dev);
> +}
> #else
> static inline struct dax_device *dax_get_by_host(const char *host)
> {
> @@ -69,6 +87,11 @@ static inline bool dax_synchronous(...
2020 Jun 02
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...39;
>> cc1: some warnings being treated as errors
>>
>> vim +/pgprot_noncached +754 drivers/vhost/vdpa.c
>>
>> 742
>> 743 static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
>> 744 {
>> 745 struct vhost_vdpa *v = vmf->vma->vm_file->private_data;
>> 746 struct vdpa_device *vdpa = v->vdpa;
>> 747 const struct vdpa_config_ops *ops = vdpa->config;
>> 748 struct vdpa_notification_area notify;
>> 749 struct vm_area_struct *vma = vmf->vma;
>> 750 u16 index = vma->...