From patchwork Thu Jun 21 09:08:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 166264 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1B6B3B6FA0 for ; Thu, 21 Jun 2012 19:09:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932071Ab2FUJJE (ORCPT ); Thu, 21 Jun 2012 05:09:04 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:37226 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759092Ab2FUJJB (ORCPT ); Thu, 21 Jun 2012 05:09:01 -0400 Received: by lbbgm6 with SMTP id gm6so1820705lbb.19 for ; Thu, 21 Jun 2012 02:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=mbGHOU5pq72rec25Uuw6igHq5yvQLrESLz6YRR5xzLY=; b=h7pofo28DUYAjl7ZSvrrWXEzcghphrwtKbULmSGekHgyHDSlv2bjuOFMzlDyWWDWXC FuljHvgITBfiB6Q+ukSBYH6xM1RV1KgVs721ydx/zVdshDrNTrNXpTKA7SVvby+MvKg0 riyMj4SY9xxSBG3mZYJMlkZmO11xe8VPhGWvheYnyiofG+53hN4RbZDA/vD20nRrptm6 QaN4n7c4EqSOY3GvzWS3NebDVGhGOdqDbXOSL9Isyiv1REPN/F6ZnTfMNCD6pKhCVZvC 4hBlSo0iHTXTHLpPbxe7MHglUpgayS/r0VIOTyCc1jIFPP0Ha5m9tmHxrZKER4egCXGa SNtQ== Received: by 10.112.82.197 with SMTP id k5mr11192471lby.98.1340269739828; Thu, 21 Jun 2012 02:08:59 -0700 (PDT) Received: from localhost.localdomain (swsoft-msk-nat.sw.ru. [195.214.232.10]) by mx.google.com with ESMTPS id xx8sm44960572lab.10.2012.06.21.02.08.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jun 2012 02:08:57 -0700 (PDT) From: Dmitry Monakhov To: linux-ext4@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, Dmitry Monakhov Subject: [PATCH 0/5] RFC: introduce extended inode owner identifier v9 Date: Thu, 21 Jun 2012 13:08:48 +0400 Message-Id: <1340269733-25922-1-git-send-email-dmonakhov@openvz.org> X-Mailer: git-send-email 1.7.5.4 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, I've updated old standing project quota id patch-set. Please take a look at it and replay me your oppinion, especially if you do not like it by some reason :) This is really important because i do want this feature to be merged sooner or later. *Feature description* 1) Inode may has a project identifier which has same meaning as uid/gid. 2) In general case Id is stored in inode's xattr named "system.project_id" NOTE: by historical reasons XFS has speciffic API, 3) Id is inherent from parent inode on creation. 4) This id is cached in memory fs_inode structure and may be accessible via s_op->get_prjid(). This field it restricted by CONFIG_PROJECT_ID. So no wasting of memory happens. 5) Since id is cached in memory it may be used for different purposes such as: 5A) Implement additional quota id space orthogonal to uid/gid. This is useful in managing quota for some filesystem hierarchy(chroot or container over bindmount) *User interface * Project id is managed via generic xattr interface "system.project_id" This good because 1) We may use already existing interface. 2) xattr already supported by generic utilities tar/rsync and etc PATCH SET TOC: 1) generic projectid support 2) generic project quota support 3) ext4: small mount flags cleanup 4) ext4 project support implementation 4A) ext4: generic project support 4B) ext4: project quota support NOTE:Ext4 quota is now managed via e2fsprogs, changes which add prjquota suppport for e2fsprogs will be submitted as separate patch-set. 5) XFS: prjquota and grpquota may coexist now Patch against next-20120605-1-g20a6ee4 Actually vfs part is really small, and most changes happen in ext4-tree Changes against V7 - Small fix for project switch error path - Remove usless macro expressions Changes against v6 - get rid of iattr stuff, current __dquot_transfer() provides sane interface for quota manipulation. i_prjid can must be changed only by fs-speciffic methods so only get() method is really necessery. - remove #ifdef tricks from generic code. - move i_prjid from vfs_inode to fs_inode, to prevent inode bloating. - get rid of isolation logic, because this feature confuse most users. Changes against v5 - convert dquota_transfer to struct iattr interface. Not it is possible to change i_prjid via notify_changes() - some bugfixes. Signed-off-by: Dmitry Monakhov --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 0d718ed..8dbcc39 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERSION = 3 PATCHLEVEL = 5 SUBLEVEL = 0 EXTRAVERSION = -rc1 -NAME = Saber-toothed Squirrel +NAME = Saber-toothed Squirrel-tree-quota # *DOCUMENTATION* # To see a list of typical targets execute "make help"