Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4945911imu; Tue, 29 Jan 2019 10:07:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN5loCGIiC//Eed7GHqeaP7+93qHkA3IolzxCrUmcPXfzIEQ/gA1sZqD4OlKzldfrgMLkWBm X-Received: by 2002:a62:5301:: with SMTP id h1mr26951865pfb.17.1548785232447; Tue, 29 Jan 2019 10:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548785232; cv=none; d=google.com; s=arc-20160816; b=dpFifqx+aJGRM48jLygnLwIpHYFk7RZYyOFjdi1APR7fiC2NekJv3jyd0BX8GeyARk hP3v/NkJvm/w/1Xyyac5hDIeuDtl07D5joPtSLl1vZX+f1XOkfYKp2NnwSMWmTJze3D7 DFAMgKtcP4om2Lxvq5uSm7jkC27zIE81MPufLtkpgVQROBop13NYKiOCm6LjqcJRDYYn X8CxyURzTab4eL+rXNdz/QmyjVVghBC8TjB6kwq2Eu9jz+ZToeE4tujymzCs4CPSB1QH yQA0ow0ggiXayu2u5I+hUa8KD+J4y3qLMfmLKiJRPuHmIv1orl1A/7M0RD11ViiOPrIq 6GeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5wNE0HV5mvZVQ9rThDrqHS4OERbxFOIR6q7tTWzLOKY=; b=vCzslZqI3UQ/1NdWAcuvG9VSY3wr4kPhwzIvGDNCoS8NsD9JnOIRvi+//ng6flm7QT sz80c29/9d5TilFFCc32YoX+zlBLegu2/bvlw5ZmDip1CbieML4HhcH8l0+ie7hnJuQj K041h7fRh5iBxGdUNWVo6HYs3022U0Rh7IJ5Q0ujQLRT4jLgEcJDtsO8TOwlgt9X058f URf1k/jBBDSTj6kfkA5+yRtk3cTEgLLb0wqAItWn/h4hQLO+V9GTgA75W64BKdE+F8Hg k6DNuvXedaPXgN37XTR5Wv4KyuO2PcV01Jzeirex09VrkNv28EuFPTtAUwODS8/7eLvn oT5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b="xOY//dpo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14si12668928pgi.134.2019.01.29.10.06.49; Tue, 29 Jan 2019 10:07:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b="xOY//dpo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729096AbfA2SGQ (ORCPT + 99 others); Tue, 29 Jan 2019 13:06:16 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44644 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728627AbfA2SGQ (ORCPT ); Tue, 29 Jan 2019 13:06:16 -0500 Received: by mail-qk1-f195.google.com with SMTP id o8so12044423qkk.11 for ; Tue, 29 Jan 2019 10:06:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5wNE0HV5mvZVQ9rThDrqHS4OERbxFOIR6q7tTWzLOKY=; b=xOY//dpoHTVUwSZfXZ/05OjwDr0eF+y/2Y6bmSq3zkXheRGFMsDGg1qdJq3wtc5STH lb0YOkAJeD0agD6UrailHN7236stm9yD5bwleGOB+xJdj2XuQottg45Iv8JqosUdHRXT ojB8zhW1G5Gi+PfF2l71gXrwc6A0KHSpbxP9YfmmGoCvYDpMnYv8pEVKQ6rNAeNGENsz WGRTqNh0wFlXU+zyYLGVg2oYmpq0JALL5odLklyruosv59nJi780zLiwyjXoAq5MH8UC YOJgGSZpO3Txw6p+PAKVOJU9p/oAlcG7xaDmGi6ZRBtcOKVqQGJ4Ty86hcQTsdNq2ROB tE4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5wNE0HV5mvZVQ9rThDrqHS4OERbxFOIR6q7tTWzLOKY=; b=SmSwjEJu2DNN01FsXowW8kI1c3drtyq9uYhFfTRwVuIrh579/xCt5uQ+emvNENrx1w chhFsgzIrMT1zEsUMy2wLGkriK+QPOiwpwB+Lpyv2pEk8u58R9ILzAF4Dw43wcXmVQqz y9r5dVjJ1AB4/tigcm6OscDm2DTqoiCGuzHYWeMqGCTod2yKybCXqQJOTTRUHdJbbVVB 9JQJRumuQZNAIb++Z/F9qajbpFRyhrTJ7ZgQ8ZrNiFEpXjEpuaRigKGWBop3oKNRj43+ x/31admFYHs/kmKTl3c5DDM0WPLzngfvjtlxVMreSevMQwf09cOCEMkEZ0ZTCcNlTweo UdCQ== X-Gm-Message-State: AJcUuke6WLsBZP5mAr50U/ru8Mnja5jbIMqnYNQZwp9fsNiamnZ9/WEF a3mLhYURvNXIEHjs9TVCgmytKA== X-Received: by 2002:a37:7885:: with SMTP id t127mr24899602qkc.323.1548785175262; Tue, 29 Jan 2019 10:06:15 -0800 (PST) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id s46sm88555537qtc.63.2019.01.29.10.06.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 10:06:14 -0800 (PST) Date: Tue, 29 Jan 2019 13:06:13 -0500 From: Josef Bacik To: Dennis Zhou Cc: David Sterba , Josef Bacik , Chris Mason , Omar Sandoval , Nick Terrell , kernel-team@fb.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] btrfs: add compression interface in (get/put)_workspace() Message-ID: <20190129180612.2su6scf3mcuj4bdd@MacBook-Pro-91.local> References: <20190128212437.11597-1-dennis@kernel.org> <20190128212437.11597-7-dennis@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128212437.11597-7-dennis@kernel.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 04:24:32PM -0500, Dennis Zhou wrote: > There are two levels of workspace management. First, alloc()/free() > which are responsible for actually creating and destroy workspaces. > Second, at a higher level, get()/put() which is the compression code > asking for a workspace from a workspace_manager. > > The compression code shouldn't really care how it gets a workspace, but > that it got a workspace. This adds get_workspace() and put_workspace() > to be the higher level interface which is responsible for indexing into > the appropriate compression type. It also introduces > btrfs_put_workspace() and btrfs_get_workspace() to be the generic > implementations of the higher interface. > > Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Thanks, Josef