From: Jan Koss <kossjan@gmail.com>
To: arjan@infradead.org
Cc: kernelnewbies@nl.linux.org, linux-fsdevel@vger.kernel.org
Subject: Re: truncate implementation
Date: Tue, 17 Jan 2006 12:21:25 +0300 [thread overview]
Message-ID: <b97d23040601170121o352bed78i9a6a84df830e6e6a@mail.gmail.com> (raw)
In-Reply-To: <1137486696.3005.15.camel@laptopd505.fenrus.org>
Thanks for reply.
> .. which isn't in the pagetable, and then the kernel notices it's
> outside the file and causes a SIGBUS.
But if length of file after truncate is 4 byte, for example,
and I do p[5]=.., this didn't cause any error, so I can append some garbage
after end of file, and this is not error?
>
> .. and removes the page from the pagetable.
>
I'm sorry for stupid question, but where we remove from pagetable,
I see two places in ext2_truncate:
block_truncate_page
and
sync_mapping_buffers
but sync_mapping_buffer called only if inode_needs_sync(inode),
so p=mmap and reading file using p cause setting of "inode_need_sync" flag?
next prev parent reply other threads:[~2006-01-17 9:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 8:18 truncate implementation Jan Koss
2006-01-17 8:31 ` Arjan van de Ven
2006-01-17 9:21 ` Jan Koss [this message]
2006-01-17 9:38 ` Arjan van de Ven
2006-01-17 9:39 ` Anton Altaparmakov
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=b97d23040601170121o352bed78i9a6a84df830e6e6a@mail.gmail.com \
--to=kossjan@gmail.com \
--cc=arjan@infradead.org \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).