diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2016-11-29 13:47:35 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2016-11-29 13:47:35 +0200 |
commit | 3b1012014da48bd4cb8819abd56bee8f410e97cc (patch) | |
tree | 398cd68e549515b459d8d94351b1fe9f6083f065 | |
parent | 3d4f54b003c2064542c08569b7e6f6c40616c711 (diff) | |
download | rpm-3b1012014da48bd4cb8819abd56bee8f410e97cc.tar.gz |
Add a debug log on blocksize normalization
Sooner or later one needs to find whether the result was using reported
or faked up sizes, at least if we're not logging it. So keep the rain
away and take the umbrella with you... Move mountpoint calculation
earlier for a nicer message.
-rw-r--r-- | lib/transaction.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index 3782cd5a3..cc312eb1d 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -173,16 +173,19 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) ? sfb.f_ffree : -1; + /* Find mount point belonging to this device number */ + dsi->mntPoint = getMntPoint(dirName, dsi->dev); + /* normalize block size to 4096 bytes if it is too big. */ if (dsi->bsize > 4096) { uint64_t old_size = dsi->bavail * dsi->bsize; + rpmlog(RPMLOG_DEBUG, + "dubious blocksize % " PRId64 " on %s, normalizing to 4096\n", + dsi->bsize, dsi->mntPoint); dsi->bsize = 4096; /* Assume 4k block size */ dsi->bavail = old_size / dsi->bsize; } - /* Find mount point belonging to this device number */ - dsi->mntPoint = getMntPoint(dirName, dsi->dev); - rpmlog(RPMLOG_DEBUG, "0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n", (unsigned) dsi->dev, dsi->bsize, |