lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b040c32a0702121414oc570ccfhd8b78a87c5ff7b86@mail.gmail.com>
Date:	Mon, 12 Feb 2007 14:14:43 -0800
From:	"Ken Chen" <kenchen@...gle.com>
To:	"Dave McCracken" <dave.mccracken@...cle.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Adam Litke" <agl@...ibm.com>
Subject: Re: [PATCH 1/1] Enable fully functional truncate for hugetlbfs

On 2/12/07, Dave McCracken <dave.mccracken@...cle.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ