COMMIT: http://review.gluster.org/13096 committed in master by Kaleb KEITHLEY (kkeithle@redhat.com)
------
commit db747eba347e2909f4fb4fc28a67adb8f188586a
Author: Soumya Koduri <skoduri@redhat.com>
Date: Mon Feb 8 22:33:56 2016 +0530
gfapi: Use inode_forget in case of handle objects
Currently with gfapi, even if applications release their
reference on paritular inode entries, those entries never
get destroyed as they shall always have positive nlookup
count unless inode_table exceeds lru limit.
Since inodes and their contexts can consume considerable
amount of memory, applications may end up consuming lot of
memory and may even get OOM killed.
To avoid that, have considered below approaches (for handle based access)-
a) Do 'inode_lookup' only if the corresponding inode is created
for the first time and forget it during close of the handle
This shall not work as multiple handle objects can refer to
same inode entry and inode_forget from second handle object
onwards shall result in assert.
b) Do 'inode_lookup' during a handle or fd creation
But this approach shall affect the performance of the fops which
operate on neither handle nor fd.
c) current approach taken-
Applications using glfs handle objects hold a reference
on corresponding inode entries. Hence it is safe to forget
those inodes and make nlookup count to '0' while trying to
delete those handle objects. That way the last unref (i.e,
from the last handle close) shall result in inode_destroy().
Change-Id: Id2c7ab178894a10c0030c143ba71e7813df8d18c
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
BUG: 1295107
Reviewed-on: http://review.gluster.org/13096
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>

COMMIT: http://review.gluster.org/13125 committed in master by Raghavendra G (rgowdapp@redhat.com)
------
commit 5bfd22123753fb88c1a2ea91ffd4f6767d89f278
Author: Soumya Koduri <skoduri@redhat.com>
Date: Thu Dec 31 13:53:54 2015 +0530
inode: Retire the inodes from the lru list in inode_table_destroy
Inodes from the lru list are not moved to purge list unless they
are retired. Also process the lru list first to unset their parent
as we need to unset their dentry entries (the ones which may not be
unset during '__inode_passivate' as they were hashed) which in turn
shall unref their parent inodes which could be in active list.
These parent inodes when unref'ed may well again fall into lru list
and if we are at the end of traversing the list, we may miss to
delete/retire that entry. Hence traverse the lru list till it
gets empty.
Change-Id: Ib7666e235e9b9644144a7c7933afb5e407e506ca
BUG: 1295107
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13125
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>