[Iscsitarget-devel] [PATCH] replace sync_page_range() with generic_write_sync() in file-io.c

Arne Redlich arne.redlich at googlemail.com
Wed Dec 16 19:51:09 UTC 2009


Am Freitag, den 04.12.2009, 15:21 -0600 schrieb Manoj Iyer: 
> ----
> resending patch, my previous mail bounced coz of membership requirement
> ----
> 
> sync_page_range() was recently removed from 2.6, this causes the
> iscsi-target build to fail in file-io.c. possibly sync_page_range() can be
> replaced with generic_write_sync() ?

Thanks for the patch, but ultimately we replaced sync_page_range() with
filemap_write_and_wait_range().

Thanks,
Arne

> Index: kernel/file-io.c
> ===================================================================
> --- kernel/file-io.c    (revision 276)
> +++ kernel/file-io.c    (working copy)
> @@ -75,8 +75,6 @@
>    static int fileio_sync(struct iet_volume *lu, struct tio *tio)
>    {
>          struct fileio_data *p = lu->private;
> -       struct inode *inode = p->filp->f_dentry->d_inode;
> -       struct address_space *mapping = inode->i_mapping;
>          loff_t ppos, count;
>          int res;
> 
> @@ -88,7 +86,7 @@
>                  count = lu->blk_cnt << lu->blk_shift;
>          }
> 
> -       res = sync_page_range(inode, mapping, ppos, count);
> +       res = generic_write_sync(p->filp, ppos, count);
>          if (res) {
>                  eprintk("I/O error: syncing pages failed: %d\n", res);
>                  return -EIO;
> cheers
> --- manjo
> 
> 
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing. 
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Iscsitarget-devel mailing list
> Iscsitarget-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel






More information about the kernel-team mailing list