lkml.org 
[lkml]   [2014]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v8 10/22] Replace the XIP page fault handler with the DAX page fault handler
    On Wed, Jul 23, 2014 at 03:10:25PM +0300, Kirill A. Shutemov wrote:
    > > +int dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf,
    > > + get_block_t get_block)
    > > +{
    > > + int result;
    > > + struct super_block *sb = file_inode(vma->vm_file)->i_sb;
    > > +
    > > + if (vmf->flags & FAULT_FLAG_WRITE) {
    >
    > Nobody seems calls sb_start_pagefault() in fault handler.
    > Do you mean FAULT_FLAG_MKWRITE?

    We need to call sb_start_pagefault() if we're going to make a modification
    to the filesystem. Admittedly, we don't know if we're going to make a
    modification at this point, but if we're taking a write fault on a hole,
    we will be. We can skip the call to sb_start_pagefault() if we're taking
    a read fault.

    > > +int dax_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
    > > + get_block_t get_block)
    > > +{
    > > + return dax_fault(vma, vmf, get_block);
    > > +}
    > > +EXPORT_SYMBOL_GPL(dax_mkwrite);
    >
    > I don't think we want to introduce new exported symbol just for dummy
    > wrapper. Just use ".page_mkwrite = foo_fault,". perf and selinux do
    > this.
    > Or add #define into header file if you want better readability.

    They were different at one time ... agreed, I can just make them an alias
    for now.


    \
     
     \ /
      Last update: 2014-07-24 12:41    [W:4.021 / U:1.384 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site