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

Re: [dm-devel] Strange mapped block count kept by dm-thin driver for thin devices

Dne 28.8.2013 05:52, Teng-Feng Yang napsal(a):

I have already noticed that the mapped block count of thin devices
shown by "dmsetup status" looked unreasonable to me for a couple of
times in the last six months.
Sometimes the mapped block count was zero, but sometimes it was a
large number which was obviously larger than the total available
blocks in thin-pool.
So I dig into the source code, and I find some codes look suspicious to me.

In dm_pool_metadata_close() in dm-thin-metadata.c, it will try to
commit transaction for the last time before it destroys the
However, it does not lock the pool_metadata before transaction commit,
which I am not really sure if we still need to acquire lock when it
reaches here.
I know that this function is mainly called when users try to remove
pool, but it seems like we can still have some on-the-fly transaction
commit when dm-thin module calls this function.
Although I would like to test it by myself, this problem occurs in
random and I am still trying to find a way to reproduce it

Any help would be grateful.

I think it's good idea in this case to catch as much info in the moment you think you see a problem.

Take  output from:

dmsetup status/info/table
safe content of your metadata device for further analysis with thin provisioning tools.

Are you using lvm2 for thin volumes ?


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