From patchwork Mon Jul 9 15:28:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 169879 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 C6F292C0204 for ; Tue, 10 Jul 2012 01:29:32 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751461Ab2GIP3D (ORCPT ); Mon, 9 Jul 2012 11:29:03 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:37289 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922Ab2GIP2z (ORCPT ); Mon, 9 Jul 2012 11:28:55 -0400 Received: by lbbgm6 with SMTP id gm6so20260515lbb.19 for ; Mon, 09 Jul 2012 08:28:50 -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=h/JNfjA8rXyD2gHHH30Xr7A/I0iepi9IEKEFFonIdn4=; b=TXKTt7oxVaT77iDNc7nSMMcAbD3NSxQ3apQxCJ5h2oJOm3qaRXIieoR1bHuNwm/5uz PdE/HXL3UP+FMF0bT1FvXDC+JYT689iVrag5s8eANCfXFfl0U7lql4aYOnJ/s4MN4VM7 TvYztRA4WTrSXxDYJhTZ+G/EWL+gHdV7QHp4mqp7IBW++KQEsTmONn6K6YzdumHeYlBi Df6jTqo5mWnKVNLNSKhVMEoXhQXOA65GPC0NMavo2+sJ8f0my/6GlRCgBeCsGS2sIDGp 3qvWbMRZZ5ROa0KzTnUVQlIg9ygD4LzQDIPmDyG4PWcrVV9uugkvlWDUowye6saH2eti KduQ== Received: by 10.112.100.234 with SMTP id fb10mr18627551lbb.12.1341847730632; Mon, 09 Jul 2012 08:28:50 -0700 (PDT) Received: from localhost.localdomain (swsoft-msk-nat.sw.ru. [195.214.232.10]) by mx.google.com with ESMTPS id pi5sm47637470lab.7.2012.07.09.08.28.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jul 2012 08:28:49 -0700 (PDT) From: Dmitry Monakhov To: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: jack@suse.cz, Dmitry Monakhov Subject: [PATCH 0/3] RFC: introduce extended inode owner identifier v10 Date: Mon, 9 Jul 2012 19:28:42 +0400 Message-Id: <1341847725-26114-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, Here is updated version subtree-quota pachset *Feature description* 1) Inode may has a subtree identifier which has same meaning as uid/gid. 2) In general case Id is stored in inode's xattr named "system.subtree" 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_subtree(). This field it restricted by CONFIG_SUBTREE. 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) 6) In comparison to XFS's project ID feature it does not affect rename(2)/link(2) in case of cross tries transfer *User interface * Subtree id is managed via generic xattr interface "system.subtree" 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 subtree support 2) ext4: generic subtree support 3) ext4: subtree quota support NOTE:Ext4 quota is now managed via e2fsprogs, changes which add prjquota suppport for e2fsprogs will be submitted as separate patch-set. Patch against next-20120605-1-g20a6ee4 Actually vfs part is really small, and most changes happen in fs/ext4/ Changes agains V9 1) Change the name of the id from "project_id" to "subtree" accordings to Dave's comments. 2) Fixes according to Jan's comments - coalapse first and second patch - get rid-of didicated mount point for subtree_id support - code style changes 3) Drop XFS stuff, since it require nontrivial changes in disk structures. Changes against V7 - Small fix for subtree 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"