From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis Henriques Subject: Re: [PATCH v4 0/6] ceph: kernel client cephfs quota support Date: Tue, 09 Jan 2018 17:24:52 +0000 Message-ID: <87lgh7ndwb.fsf@hermes.olymp> References: <20180105104723.16202-1-lhenriques@suse.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mx2.suse.de ([195.135.220.15]:48299 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752816AbeAIRY7 (ORCPT ); Tue, 9 Jan 2018 12:24:59 -0500 In-Reply-To: (Zheng Yan's message of "Mon, 8 Jan 2018 20:55:35 +0800") Sender: ceph-devel-owner@vger.kernel.org List-ID: To: "Yan, Zheng" Cc: ceph-devel , "Yan, Zheng" , Jeff Layton , Jan Fajerski "Yan, Zheng" writes: > I also wish to do some optimization (incremental patches) to the code > > 1. avoid quota check if there is no quota in the filesystem. we can > use a variable to tracker how many snaprealm have quota enabled. I was thinking this should probably be an atomic64_t in struct ceph_mds_client. Does this make sense? Also, it would probably make sense to have the following functions as inline, defined in super.h: ceph_quota_is_max_files_exceeded ceph_quota_is_max_bytes_exceeded ceph_quota_is_max_bytes_approaching This way they could simply check the mdsc and return immediately if the counter is 0. > 2. save inode pointer (not increase inode's reference count) in > ceph_snap_realm data structure. so we can avoid calling > ceph_find_inode() in check_quota_exceeded() Would you like me to work on v5 to include these changes, or would you rather keep v4 and simply have 2 extra patches on top implementing these optimisations? Cheers, -- Luis