FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 12-04-2009, 08:21 PM
Manoj Iyer
 
Default replace sync_page_range() with generic_write_sync() in file-io.c

----
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() ?

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
", res);
return -EIO;
cheers
--- manjo


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 12-04-2009, 09:37 PM
John Johansen
 
Default replace sync_page_range() with generic_write_sync() in file-io.c

Manoj Iyer wrote:
> ----
> 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() ?
>
yeah they basically do the same thing though it looks like generic_write_sync
can be heavier than what is needed in some cases. See
http://lkml.org/lkml/2009/8/19/330

I haven't followed through to check whether this is the case with iscsi-target
yet.

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 12-07-2009, 03:09 PM
Tim Gardner
 
Default replace sync_page_range() with generic_write_sync() in file-io.c

John Johansen wrote:
> Manoj Iyer wrote:
>> ----
>> 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() ?
>>
> yeah they basically do the same thing though it looks like generic_write_sync
> can be heavier than what is needed in some cases. See
> http://lkml.org/lkml/2009/8/19/330
>
> I haven't followed through to check whether this is the case with iscsi-target
> yet.
>

Seems to me that we should use filemap_write_and_wait_range() in order
to preserve the intended semantics of the original call to
sync_page_range(). Since this is a network protocol, we don't want file
pages getting cached, or is my interpretation too naive?

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 12-07-2009, 04:55 PM
Tim Gardner
 
Default replace sync_page_range() with generic_write_sync() in file-io.c

Tim Gardner wrote:
> John Johansen wrote:
>> Manoj Iyer wrote:
>>> ----
>>> 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() ?
>>>
>> yeah they basically do the same thing though it looks like generic_write_sync
>> can be heavier than what is needed in some cases. See
>> http://lkml.org/lkml/2009/8/19/330
>>
>> I haven't followed through to check whether this is the case with iscsi-target
>> yet.
>>
>
> Seems to me that we should use filemap_write_and_wait_range() in order
> to preserve the intended semantics of the original call to
> sync_page_range(). Since this is a network protocol, we don't want file
> pages getting cached, or is my interpretation too naive?
>
> rtg

Andy - please pull from git://kernel.ubuntu.com/rtg/ubuntu-lucid
iscsitarget.

Use filemap_write_and_wait_range() in place of sync_page_range(). This
appears to better preserve the original semantics.

rtg
--
Tim Gardner tim.gardner@canonical.com
The following changes since commit 21c7b269cdd9ad37de22eb5ad73a350e1aed2441:
Andy Whitcroft (1):
UBUNTU: Ubuntu-2.6.32-7.10

are available in the git repository at:

git://kernel.ubuntu.com/rtg/ubuntu-lucid iscsitarget

Manoj Iyer (1):
UBUNTU: Upgrade iscsitarget source from 0.4.17 to 1.4.19

ubuntu/Makefile | 2 +-
ubuntu/iscsitarget/Makefile | 2 +-
ubuntu/iscsitarget/config.c | 8 +
ubuntu/iscsitarget/conn.c | 11 ++
ubuntu/iscsitarget/file-io.c | 2 +-
ubuntu/iscsitarget/include/iet_u.h | 12 ++-
ubuntu/iscsitarget/iscsi.c | 326 +++++++++++++++++++++++++-----------
ubuntu/iscsitarget/iscsi.h | 64 +++++++-
ubuntu/iscsitarget/iscsi_dbg.h | 7 +
ubuntu/iscsitarget/iscsi_hdr.h | 4 +-
ubuntu/iscsitarget/nthread.c | 67 +++++++-
ubuntu/iscsitarget/param.c | 11 +-
ubuntu/iscsitarget/session.c | 56 ++++++-
ubuntu/iscsitarget/target.c | 61 +++++--
ubuntu/iscsitarget/target_disk.c | 165 +++++++++++++-----
ubuntu/iscsitarget/ua.c | 164 ++++++++++++++++++
16 files changed, 780 insertions(+), 182 deletions(-)
create mode 100644 ubuntu/iscsitarget/ua.c
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 12-07-2009, 05:35 PM
 
Default replace sync_page_range() with generic_write_sync() in file-io.c

I did consider both functions, and I based my patch on SHAID
aa3caafe53cab7ef60605e481cd5d7943e1c3022 pohmelfs: Use new syncing helper:
Use new generic_write_sync() helper instead of sync_page_range() patch.

I also saw a patch SHAID af0f4414f343429971d33b0dd8dccc85c1f3dcd2 xfs:
Convert sync_page_range() to simple filemap_write_and_wait_range()

From definition of

generic_write_sync - perform syncing after a write if file / inode is sync

seemed more appropriate to me at that time.

Cheers
--- manjo

On Mon, 7 Dec 2009, Tim Gardner wrote:

> Tim Gardner wrote:
>> John Johansen wrote:
>>> Manoj Iyer wrote:
>>>> ----
>>>> 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() ?
>>>>
>>> yeah they basically do the same thing though it looks like generic_write_sync
>>> can be heavier than what is needed in some cases. See
>>> http://lkml.org/lkml/2009/8/19/330
>>>
>>> I haven't followed through to check whether this is the case with iscsi-target
>>> yet.
>>>
>>
>> Seems to me that we should use filemap_write_and_wait_range() in order
>> to preserve the intended semantics of the original call to
>> sync_page_range(). Since this is a network protocol, we don't want file
>> pages getting cached, or is my interpretation too naive?
>>
>> rtg
>
> Andy - please pull from git://kernel.ubuntu.com/rtg/ubuntu-lucid
> iscsitarget.
>
> Use filemap_write_and_wait_range() in place of sync_page_range(). This
> appears to better preserve the original semantics.
>
> rtg
> --
> Tim Gardner tim.gardner@canonical.com
>

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 01:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org