All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Machida, Hiroyuki" <machida@sm.sony.co.jp>
To: linux-kernel@vger.kernel.org
Cc: "Machida, Hiroyuki" <machida@sm.sony.co.jp>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Andrew Morton <akpm@osdl.org>,
	David Howells <dhowells@redhat.com>
Subject: [PATCH] generic_osync_inode() with OSYNC_INODE only passed (Re: [PATCH 1/2] miss-sync changes on attributes)
Date: Fri, 14 Oct 2005 22:01:28 +0900	[thread overview]
Message-ID: <434FAC28.20000@sm.sony.co.jp> (raw)
In-Reply-To: <434CD445.2040704@sm.sony.co.jp>


generic_osync_inode() seems to do over-writing, if OSYNC_INODE only passed.
According comments of generic_osync_inode(), it is expected to write inode
itself only. Current implementation trys to write data page, even if
OSYNC_INODE only passed. This patch fixes it.

This patch is preparetion of other patch to fix "miss-sync changes on
attributes".


Machida, Hiroyuki wrote:
> 
> 
> OGAWA Hirofumi wrote:
> 
>> "Machida, Hiroyuki" <machida@sm.sony.co.jp> writes:
>>
>>
>>> OGAWA Hirofumi wrote:
>>>
>>>> Andrew Morton <akpm@osdl.org> writes:
>>>>
>>>>
>>>>> However there's not much point in writing a brand-new function when
>>>>> write_inode_now() almost does the right thing.  We can share the
>>>>> implementation within fs-writeback.c.
>>>>
>>>>
>>>> Indeed. We use the generic_osync_inode() for it?
>>>
>>>
>>> Please let me confirm.
>>> Using generic_osync_inode(inode, NULL, OSYNC_INODE) instaed of
>>> sync_inode_wodata(inode) is peferable for changes on fs/open.c,
>>> even it would write data. Is it correct?
>>
>>
>>
>> No, I only thought the interface is good. I don't know why it writes
>> data pages even if OSYNC_INODE only.
> 
> 
> 
> I checked 2.6.13 tree, following functions call generic_osync_inode().
> However noone calls it with OSYNC_INODE. SO I can't find intention of
> it's usage.
> 
> Does anyone know why generic_osync_inode() trys to write data page,
> even if OSYNC_INODE only passed ?
> 
>   - fs/reiserfs/file.c
>     reiserfs_file_write()        OSYNC_METADATA | OSYNC_DATA
>   - mm/filemap.c
>     sync_page_range()        OSYNC_METADATA
>     sync_page_range_nolock()    OSYNC_METADATA
>     generic_file_direct_write    OSYNC_METADATA
> 

-- 
Hiroyuki Machida		machida@sm.sony.co.jp		


  reply	other threads:[~2005-10-14 13:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 20:39 [PATCH 2/2][FAT] miss-sync issues on sync mount (miss-sync on utime) Machida, Hiroyuki
2005-09-15 13:15 ` OGAWA Hirofumi
2005-09-15 13:58   ` Machida, Hiroyuki
2005-09-29 17:35   ` [PATCH 1/2] miss-sync changes on attributes (Re: [PATCH 2/2][FAT] miss-sync issues on sync mount (miss-sync on utime)) Machida, Hiroyuki
2005-09-29 17:49     ` [PATCH 2/2] replace ext2_sync_inode() with sync_inode_wodata( " Machida, Hiroyuki
2005-09-29 19:20     ` [PATCH 1/2] miss-sync changes on attributes " Machida, Hiroyuki
2005-10-11 21:26     ` Andrew Morton
2005-10-12  4:02       ` OGAWA Hirofumi
2005-10-12  4:16         ` Andrew Morton
2005-10-12  4:58           ` OGAWA Hirofumi
2005-10-12  5:47             ` OGAWA Hirofumi
2005-10-12  5:54             ` Machida, Hiroyuki
2005-10-12  6:10               ` Andrew Morton
2005-10-12  9:04                 ` Machida, Hiroyuki
2005-10-12  6:21               ` OGAWA Hirofumi
2005-10-12  9:15                 ` Machida, Hiroyuki
2005-10-14 13:01                   ` Machida, Hiroyuki [this message]
2005-10-14 13:02                   ` [PATCH] generic_osync_inode() with OSYNC_INODE only passed (Re: [PATCH 1/2] miss-sync changes on attributes) Machida, Hiroyuki
2005-10-29  8:42           ` [PATCH] Fix !mapping_cap_writeback_dirty(inode->i_mapping) OGAWA Hirofumi
2005-10-29  8:58             ` [PATCH] Don't use pdflush for filesystems has BDI_CAP_NO_WRITEBACK OGAWA Hirofumi
2005-10-30 17:15               ` OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=434FAC28.20000@sm.sony.co.jp \
    --to=machida@sm.sony.co.jp \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.