From: Andrew Morton <akpm@osdl.org>
To: Peter Staubach <staubach@redhat.com>
Cc: staubach@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memory mapped files not updating timestamps
Date: Sun, 18 Jun 2006 21:33:56 -0700 [thread overview]
Message-ID: <20060618213356.e847db04.akpm@osdl.org> (raw)
In-Reply-To: <447DD80C.2000408@redhat.com>
On Wed, 31 May 2006 13:53:16 -0400
Peter Staubach <staubach@redhat.com> wrote:
>
A few issues here.
>
> I embarked on this work due to a bug reported by one of Red Hat's large
> customers. They are finding that files, which should have been backed
> up, were not getting backed up. This is due to the mtime on the files
> not changing and their backup software looking for mtime changes. This
> is corruption and I need to get it fixed, sooner as opposed to later.
>
> While I would like to get this fixed on top of Peter Zijlstra's changes,
> the process for those is looking long and complicated. I am wondering
> if we could consider these changes and then add the requirement of
> maintaining these semantics to those that Peter's work is attempting to
> address.
>
We seem to be having a problem getting a coherent changelog. A changelog
should describe why the patch exists, what it does and how it does it.
Please develop and maintain a changelog for each patch and reissue the
changelog with each reissuing of a patch, thanks.
This sequence:
+ if (test_and_clear_bit(AS_MCTIME, &mapping->flags))
+ inode_update_time(inode);
appears all over the place and should be implemented in a helper function.
The patch should work correctly for mmaps of block devices and I don't
think it does. Sometimes it updates the timestamp on the kernel-internal
blockdev inode at mapping->host and sometimes it updates the inode of the
device node (/dev/hda1) at file->f_dentry->d_inode. It should be updating
the /dev/hda1 inode.
The change to unlink_file_vma() is awkward, IMO. It means that this helper
function "knows" things about what its caller is using it for. I'd suggest
that this code should be moved up to a higher level where we have a more
sure semantic context, rather than being implemented in some low-level
helper function where it happens to be convenient.
Also, inode_update_time() can sleep.
mark_inode_dirty_sync()->__mark_inode_dirty()->ext3_dirty_inode(). This is
despite Documentation/filesystems/Locking saying "must not sleep". But
unlink_file_vma() (at least) is called from atomic context:
unmap_region()
->tlb_gather_mmu()
->preempt_disable()
->free_pgtables()
->unlink_file_vma()
->tlb_finish_mmu()
->preempt_enable()
Which _should_ have triggered warnings if full kernel debugging was enabled
and sufficient testing was performed. Perhaps a might_sleep() is needed in
_mark_inode_dirty().
prev parent reply other threads:[~2006-06-19 4:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 15:16 [PATCH] memory mapped files not updating timestamps Peter Staubach
2006-05-17 19:24 ` Hugh Dickins
2006-05-18 10:52 ` Peter Zijlstra
2006-05-18 22:13 ` Peter Staubach
2006-05-31 17:53 ` Peter Staubach
2006-05-31 19:38 ` Eric Dumazet
2006-05-31 20:38 ` Peter Staubach
2006-06-19 4:33 ` Andrew Morton [this message]
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=20060618213356.e847db04.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=staubach@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox