Re: 2.6.17-rc3+git seems to corrupt dpkg databases

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

 



On Tue, 23 May 2006, David Miller wrote:

From: Jurij Smakov <jurijus@xxxxxxxxx>
Date: Tue, 23 May 2006 21:33:25 -0700 (PDT)

FWIW, I have just reproduced the problem on my Ultra5 running 2.6.17-rc4
by trying to install KDE and all dependencies :-(.

How exactly does dpkg access these files (particularly the 'status'
file)?  It is just normal reads and writes, or does it use mmap()?

From a quick look at the code (dpkg-1.13.19), it appears that the status
file is mmap'ed for reading with

mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0)

at lib/parse.c:114. When the database is written to disk, it is constructed line by line, which are written out to disk using fputs()
at lib/dump.c:306. The file is fflush'ed and fsync'ed after writing.

Best regards,

Jurij Smakov                                        jurij@xxxxxxxxx
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux