Hi,
On Thu, 1 Mar 2001, Alexander Viro wrote:
> +static int generic_vm_expand(struct address_space *mapping, loff_t size)
> +{
> + struct page *page;
> + unsigned long index, offset;
> + int err;
> +
> + if (!mapping->a_ops->prepare_write || !mapping->a_ops->commit_write)
> + return -ENOSYS;
> +
> + offset = (size & (PAGE_CACHE_SIZE-1)); /* Within page */
> + index = size >> PAGE_CACHE_SHIFT;
For affs I did basically the same with a small difference:
offset = ((size-1) & (PAGE_CACHE_SIZE-1)) + 1;
index = (size-1) >> PAGE_CACHE_SHIFT;
That works fine here and allocates a page in the cache more likely to be
used.
bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- fat problem in 2.4.2 James D Strandboge
- Re: fat problem in 2.4.2 Alan Cox
- Re: fat problem in 2.4.2 Peter Daum
- [PATCH] Re: fat problem in 2.4.2 Alexander Viro
- Re: [PATCH] Re: fat problem in 2.4.2 Albert D. Cahalan
- Re: fat problem in 2.4.2 Alan Cox
- [CFT][PATCH] Re: fat problem in 2.4.2 Alexander Viro
- Re: [CFT][PATCH] Re: fat problem ... Linus Torvalds
- Re: [CFT][PATCH] Re: fat prob... Chris Mason
- Re: [CFT][PATCH] Re: fat problem ... Roman Zippel
- Re: [CFT][PATCH] Re: fat prob... Alexander Viro
- Re: [CFT][PATCH] Re: fat ... Roman Zippel
- ftruncate not extending files? bert hubert
- Re: ftruncate not extending files... Malcolm Beattie
- Re: ftruncate not extending files... Dmitry A. Fedorov
- Re: ftruncate not extending f... Hugh Dickins
- Re: ftruncate not extendi... Kai Henningsen
- Re: ftruncate not extending files... Jens-Uwe Mager

