summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/kernfs
AgeCommit message (Collapse)Author
2020-10-12Merge release-20200928.0-94-ge7bbe70f7 (automated)gVisor bot
2020-10-12[vfs] kernfs: Fix inode memory leak issue.Ayush Ranjan
This change aims to fix the memory leak issue reported inĀ #3933. Background: VFS2 kernfs kept accumulating invalid dentries if those dentries were not walked on. After substantial consideration of the problem by our team, we decided to have an LRU cache solution. This change is the first part to that solution, where we don't cache anything. The LRU cache can be added on top of this. What has changed: - Introduced the concept of an inode tree in kernfs.OrderedChildren. This is helpful is cases where the lifecycle of an inode is different from that of a dentry. - OrderedChildren now deals with initialized inodes instead of initialized dentries. It now implements Lookup() where it constructs a new dentry using the inode. - OrderedChildren holds a ref on all its children inodes. With this change, now an inode can "outlive" a dentry pointing to it. See comments in kernfs.OrderedChildren. - The kernfs dentry tree is solely maintained by kernfs only. Inode implementations can not modify the dentry tree. - Dentries that reach ref count 0 are removed from the dentry tree. - revalidateChildLocked now defer-DecRefs the newly created dentry from Inode.Lookup(), limiting its life to the current filesystem operation. If refs are picked on the dentry during the FS op (via an FD or something), then it will stick around and will be removed when the FD is closed. So there is essentially _no caching_ for Look()ed up dentries. - kernfs.DecRef does not have the precondition that fs.mu must be locked. Fixes #3933 PiperOrigin-RevId: 336768576
2020-10-09Merge release-20200928.0-78-g743327817 (automated)gVisor bot
2020-10-08Merge release-20200928.0-66-ga55bd73d4 (automated)gVisor bot
2020-09-27Merge release-20200921.0-54-gfa995da84 (automated)gVisor bot
2020-09-27Fix kernfs race condition.Dean Deng
Do not release dirMu between checking whether to create a child and actually inserting it. Also fixes a bug in fusefs which was causing it to deadlock under the new lock ordering. We do not need to call kernfs.Dentry.InsertChild from newEntry because it will always be called at the kernfs filesystem layer. Updates #1193. PiperOrigin-RevId: 334049264
2020-09-24Merge release-20200914.0-158-g832d91b80 (automated)gVisor bot
2020-09-24[vfs] kernfs: Do not hold reference on the inode when opening FD.Ayush Ranjan
The FD should hold a reference on the dentry they were opened on which in turn holds a reference on the inode it points to. PiperOrigin-RevId: 333589223
2020-09-24Merge release-20200914.0-154-g2a10bc1e4 (automated)gVisor bot
2020-09-24[vfs] [2/2] kernfs: kernfs: Internally use kernfs.Dentry instead of vfs.Dentry.Ayush Ranjan
Update signatures for: - All methods in inodeDirectory - deferDecRef() and Filesystem.droppedDentries - newSyntheticDirectory() - `slot`s used in OrderedChildren and subsequent methods like replaceChildLocked() and checkExistingLocked() - stepExistingLocked(), walkParentDirLocked(), checkCreateLocked() Updates #1193 PiperOrigin-RevId: 333558866
2020-09-24Merge release-20200914.0-152-g0a7075f38 (automated)gVisor bot
2020-09-24Add basic stateify annotations.Adin Scannell
Updates #1663 PiperOrigin-RevId: 333539293
2020-09-24Merge release-20200914.0-144-g08bbad690 (automated)gVisor bot
2020-09-23[vfs] kernfs: Enable leak checking consistently.Ayush Ranjan
There were some instances where we were not enabling leak checking. PiperOrigin-RevId: 333418571
2020-09-23Merge release-20200914.0-137-g99decaadd (automated)gVisor bot
2020-09-23Merge release-20200914.0-136-gb54dbdfdc (automated)gVisor bot
2020-09-23Merge release-20200914.0-135-gc0f21bb19 (automated)gVisor bot
2020-09-22Merge release-20200914.0-134-gcf3cef117 (automated)gVisor bot
2020-09-22Merge release-20200914.0-133-g20dc83c9e (automated)gVisor bot
2020-09-22[vfs] [1/2] kernfs: Internally use kernfs.Dentry instead of vfs.Dentry.Ayush Ranjan
Update signatures for: - walkExistingLocked - checkDeleteLocked - Inode.Open Updates #1193 PiperOrigin-RevId: 333163381
2020-09-22Merge release-20200914.0-132-g778c36717 (automated)gVisor bot
2020-09-22Merge release-20200914.0-130-g13a9a622e (automated)gVisor bot
2020-09-22Merge release-20200914.0-129-gf134f873f (automated)gVisor bot
2020-09-21Merge release-20200914.0-127-g059d90b9f (automated)gVisor bot
2020-09-21Merge release-20200914.0-125-g06dbd5b7b (automated)gVisor bot
2020-09-21Merge release-20200914.0-124-g10dcefbc7 (automated)gVisor bot
2020-09-21Use kernfs.Dentry for kernfs.Lookup.Dean Deng
Updates #1193. PiperOrigin-RevId: 332939026
2020-09-21Merge release-20200914.0-123-ga129204cf (automated)gVisor bot
2020-09-21Merge release-20200914.0-122-gd72022373 (automated)gVisor bot
2020-09-18Merge release-20200907.0-153-g4ba86e625 (automated)gVisor bot
2020-09-18Merge release-20200907.0-151-g6c9989cb8 (automated)gVisor bot
2020-09-18Merge release-20200907.0-150-gc23e39f41 (automated)gVisor bot
2020-09-18Merge release-20200907.0-149-gb8ba0893e (automated)gVisor bot
2020-09-18Merge release-20200907.0-148-gca4ecf481 (automated)gVisor bot
2020-09-18Merge release-20200907.0-147-gf911b43f0 (automated)gVisor bot
2020-09-18Merge release-20200907.0-146-gddf37cb19 (automated)gVisor bot
2020-09-18Merge release-20200907.0-144-gdedef4392 (automated)gVisor bot
2020-09-18Merge pull request #3972 from btw616:fix/commentsgVisor bot
PiperOrigin-RevId: 332486111
2020-09-18Merge release-20200907.0-142-gfcf8d7c6d (automated)gVisor bot
2020-09-18Merge release-20200907.0-140-gef7d9a6fc (automated)gVisor bot
2020-09-18Merge release-20200907.0-139-g313e1988c (automated)gVisor bot
2020-09-18Merge release-20200907.0-138-g360006d89 (automated)gVisor bot
2020-09-18Merge release-20200907.0-137-g07d832dbb (automated)gVisor bot
2020-09-18Merge release-20200907.0-136-g2fbd31e72 (automated)gVisor bot
2020-09-18Merge release-20200907.0-134-gd34bda027 (automated)gVisor bot
2020-09-18Merge release-20200907.0-133-gc0b74be54 (automated)gVisor bot
2020-09-18Merge release-20200907.0-132-g23fcbd872 (automated)gVisor bot
2020-09-18Merge release-20200907.0-131-g1e8beb5f1 (automated)gVisor bot
2020-09-17Merge release-20200907.0-130-gf1f844daa (automated)gVisor bot
2020-09-17Merge release-20200907.0-129-g319d1b8ba (automated)gVisor bot