linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Don't store cred in nfs_access_entry
@ 2021-09-27 23:47 NeilBrown
  2021-09-27 23:47 ` [PATCH 3/3] NFS: don't store 'struct cred *' in struct nfs_access_entry NeilBrown
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: NeilBrown @ 2021-09-27 23:47 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs

It turns out that storing a counted ref to 'struct cred' in
nfs_access_entry wasn't a good choice.
'struct cred' contains counted references to 'struct key', and users
have a quota on how many keys they can have.  Keeping a cred in a cache
imposes on that quota.

The nfs access cache can keep a large number of entries, and keep them
indefinitely.  This can cause a user to go over-quota.

This series removes the 'struct cred *' from nfs_access_entry and
instead stores the uid, gid, and a pointer to the group info.
This makes the nfs_access_entry 64 bits larger.

Thanks,
NeilBrown

---

NeilBrown (3):
      NFS: change nfs_access_get_cached to only report the mask
      NFS: pass cred explicitly for access tests
      NFS: don't store 'struct cred *' in struct nfs_access_entry


 fs/nfs/dir.c            | 63 ++++++++++++++++++++++++++++++++++-------
 fs/nfs/nfs3proc.c       |  5 ++--
 fs/nfs/nfs4proc.c       | 13 +++++----
 include/linux/nfs_fs.h  |  6 ++--
 include/linux/nfs_xdr.h |  2 +-
 5 files changed, 67 insertions(+), 22 deletions(-)

--
Signature


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-16 21:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 23:47 [PATCH 0/3] Don't store cred in nfs_access_entry NeilBrown
2021-09-27 23:47 ` [PATCH 3/3] NFS: don't store 'struct cred *' in struct nfs_access_entry NeilBrown
2021-09-27 23:47 ` [PATCH 1/3] NFS: change nfs_access_get_cached to only report the mask NeilBrown
2021-09-27 23:47 ` [PATCH 2/3] NFS: pass cred explicitly for access tests NeilBrown
2021-11-16 20:49 ` [PATCH 0/3] Don't store cred in nfs_access_entry NeilBrown
2021-11-16 20:57   ` Trond Myklebust
2021-11-16 21:03     ` NeilBrown
2021-11-16 21:35     ` Anna Schumaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).