From: "Ken Chen" <kenchen@google.com>
To: Dave McCracken <dave.mccracken@oracle.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Adam Litke <agl@us.ibm.com>
Subject: Re: [PATCH 1/1] Enable fully functional truncate for hugetlbfs
Date: Mon, 12 Feb 2007 14:14:43 -0800 [thread overview]
Message-ID: <b040c32a0702121414oc570ccfhd8b78a87c5ff7b86@mail.gmail.com> (raw)
In-Reply-To: <20070212142802.15738.80487.sendpatchset@wildcat.int.mccr.org>
On 2/12/07, Dave McCracken <dave.mccracken@oracle.com> wrote:
> This patch enables the full functionality of truncate for hugetlbfs
> files. Truncate was originally limited to reducing the file size
> because page faults were not supported for hugetlbfs. Now that page
> faults have been implemented it is now possible to fully support
> truncate.
ye!
> --- 2.6.20/./fs/hugetlbfs/inode.c 2007-02-04 12:44:54.000000000 -0600
> +++ 2.6.20-htrunc/./fs/hugetlbfs/inode.c 2007-02-05 13:02:00.000000000 -0600
> + if (hugetlb_reserve_pages(inode, inode->i_size >> HPAGE_SHIFT,
> + offset >> HPAGE_SHIFT))
> + goto out_mem;
> + i_size_write(inode, offset);
hugetlb_reserve_pages() is used to reserve pages for shared mapping
and is used only for the size of mapping at the time of mmap(). We
shouldn't call this function when expanding hugetlb file.
- Ken
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-02-12 22:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 14:28 [PATCH 1/1] Enable fully functional truncate for hugetlbfs Dave McCracken
2007-02-12 22:14 ` Ken Chen [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=b040c32a0702121414oc570ccfhd8b78a87c5ff7b86@mail.gmail.com \
--to=kenchen@google.com \
--cc=agl@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dave.mccracken@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).