[LU-2072] Leak of s_mb_prealloc_table in ldiskfs Created: 01/Oct/12  Updated: 01/Sep/15  Resolved: 06/Feb/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.4.0, Lustre 2.1.5

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: Bruno Faccini (Inactive)
Resolution: Fixed Votes: 0
Labels: ldiskfs

Issue Links:
Related
is related to LU-7087 Leak of s_mb_prealloc_table in ldiskfs Open
Severity: 3
Rank (Obsolete): 4326

 Description   

All 2.x versions at least seems to be affected.

It seems ext4-prealloc-rhel6.patch adds sbi->s_mb_prealloc_table field that is allocated using kmalloc (128 bytes on my system) and is never freed.

Needs to be freed in ldiskfs_mb_release



 Comments   
Comment by Peter Jones [ 23/Nov/12 ]

Bruno

Can you please look into this one?

Peter

Comment by Bruno Faccini (Inactive) [ 24/Nov/12 ]

Hello Oleg,
Just for my understanding did you find this by monitoring the slabs usage or by browsing the source code ??
Thank's.
Bruno.

Comment by Bruno Faccini (Inactive) [ 27/Nov/12 ]

Master patch submitted at http://review.whamcloud.com/4683.

Comment by Bruno Faccini (Inactive) [ 03/Dec/12 ]

Oops, just submitted patch set 2 ..., because I forgot some rules to patch a patch !!!

Comment by Bruno Faccini (Inactive) [ 04/Dec/12 ]

Patch Set 2 looks better ..., I verified that after "mount t ldiskfs/umount/sync/drop_caches", super_block>s_fs_info>s_mb_prealloc_table was freed.

Comment by Bruno Faccini (Inactive) [ 10/Jan/13 ]

I submitted patch #3 according to Andreas comment to better add missing kfree()s of s_mb_prealloc_table, in patch ext4-prealloc-rhel6.patch where it was introduced.

I did not submit a new patch against ext4-[prealloc,malloc]-rhel5.patch for master since it seems we don't build master Server distros for rhel5, am I right ? Or do I need to do it anyway, at least for 1.8 ?

Comment by Bruno Faccini (Inactive) [ 06/Feb/13 ]

Status as fixed since not reported with Lustre-1.8/EL5 and Master patch should be ok for all 2.x versions.

Comment by Emoly Liu [ 20/Feb/13 ]

b2_1 port is at http://review.whamcloud.com/5474

Generated at Sat Feb 10 01:22:07 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.