Re: [PATCH/RFC v3 06/13] Read index-v5

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

 



Am 8/8/2012 14:05, schrieb Nguyen Thai Ngoc Duy:
> uOn Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer <t.gummerer@xxxxxxxxx> wrote:
>> +static struct cache_entry *read_entry(struct directory_entry *de,
>> +                       unsigned long *entry_offset,
>> +                       void **mmap,
>> +                       unsigned long mmap_size,
>> +                       unsigned int *foffsetblock,
>> +                       int fd)
>> +{
>> ....
>> +               if (crc_wrong) {
>> +                       /* wait for 10 milliseconds */
>> +                       usleep(10*1000);
>> +                       munmap(*mmap, mmap_size);
>> +                       *mmap = xmmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
>> +               }
> 
> Do we really need to munmap and mmap again?

Yes. mmap may be the pread()-based implementation from compat/mmap.c.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]