Re: [PATCH] index_file_open: ask fopen to access the file using mmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Cristian,

On Fri, Dec 16, 2011 at 10:14 PM, Cristian Rodríguez
<crrodriguez@xxxxxxxxxxxx> wrote:
> ---
>  libkmod/libkmod-index.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c
> index c376176..0c18014 100644
> --- a/libkmod/libkmod-index.c
> +++ b/libkmod/libkmod-index.c
> @@ -336,7 +336,7 @@ struct index_file *index_file_open(const char *filename)
>        uint32_t magic, version;
>        struct index_file *new;
>
> -       file = fopen(filename, "re");
> +       file = fopen(filename, "rem");

Humn... we already have a mmap implementation of the indexes that use
some optimizations when reading it. So, it doens't make much sense to
change this function to use mmap too.

In future we may remove this implementation if the mmap one does prove
being better.


Thanks anyway
Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux