Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2602541imm; Thu, 16 Aug 2018 12:14:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyLM1pi8q3aivfmt/FoXP+LBcjgIEsrUel3hWrGrvaE9q0kyYwqKkUXnf8a90zkStDSca86 X-Received: by 2002:a63:f:: with SMTP id 15-v6mr30242429pga.430.1534446843715; Thu, 16 Aug 2018 12:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534446843; cv=none; d=google.com; s=arc-20160816; b=RYZY46h3b/rfBHSO1hTEyP5NiySKCc7oXhkWiilgkN9cWVweYK5Xs69iz8jMob3uRY a8hgfaYB9y9jeKyDpog10J9QZJZ+tTX9cO+AuhxwmhFkzPXasM2E6QL47L4iJUkg71Qg DsSLVx33A/9VDjIMOewqhm/vbmuDd9zyWU4asyNWXTxynJFXAXWlq1+aEIUgtYiEnwq6 HVE7W96Hjn22ocXS/ayT7JWrJqoApIBUH0tK0LNecFOegs0B/UdrvEdRSzOgIx2Qt/nq vZAShVurMkDLuj1PLb8s45xehitaNpsjXglz0SlnFYZEHlCI4shUoU5HTWHpbNbQmgyX tt0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=JC+UVoXhXaaYQ+xpSZnODh+SvO+nh4B1OD/uPQfQhgA=; b=tB3avUJhwD7STxGopHzqInbCIijvhxVwmxqHt7ofL6m5YHEq+pvSlEW95j4IK5qZVY gE4J5q5TctbvP5TOMeb0DhpMu1LrRAptfhSQmWN3XgNqFzL6lK4k4UuX5bEFhU9WDn35 frzDi4X7bkN661XTarPrUdJLvTrQr4kda/ksTwcS6g7aow7L4H1u7ZxD/0jSH/p6sCfx UFkZoOMOXuABcLb+dZGrODMDVB6LiFBa++nvaia6sbEgPgpTgyTk2QkV3i7ukAAoB7TZ rOg4PB60pjUrE9ZGvlP2Ys/1mADRtf9oD+7EX4k+1hwGbG94PEJ50JoSnRhKWrF6CXnT Jx1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=zUNDbP4m; 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 y9-v6si103118pll.291.2018.08.16.12.13.48; Thu, 16 Aug 2018 12:14:03 -0700 (PDT) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=zUNDbP4m; 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 S1726214AbeHPWMI (ORCPT + 99 others); Thu, 16 Aug 2018 18:12:08 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:41516 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbeHPWMH (ORCPT ); Thu, 16 Aug 2018 18:12:07 -0400 Received: by mail-io0-f196.google.com with SMTP id q4-v6so4770992iob.8 for ; Thu, 16 Aug 2018 12:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JC+UVoXhXaaYQ+xpSZnODh+SvO+nh4B1OD/uPQfQhgA=; b=zUNDbP4merDmu13RdbWKCH+MoVdZmapy/I819/Zqv2iP6bVj8Bl/9kAotd1jsXw28z E6qTsNSypNYFqzQ+tWH0GQ9PlZAc68STot4t1n/QtIAZOyUfXd7ViHjeSMNJARIBZvuu XEzH854moqrxdd1RvoEC0fkhi0qAqt7cYr6YGwrTUxV14sskPrIGT3IL10xEQONGP2aH /iDMMsfhJ+fynvxK4IUTy8kcO+ZLR4/adJ5R0n/UbRsH8w8pO+K960jsr0dKQKTE2Unt f/UIMTQCGko/v8DE9lJyWs6WJN60jxffdUeYeaKRDNVlAj6PjWgsItVWj46ZxvAL82mq xrIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JC+UVoXhXaaYQ+xpSZnODh+SvO+nh4B1OD/uPQfQhgA=; b=Blqf1/s428fk+aia7aedwumskQw3lL2MPyGDdWC++jzlI5QdWEPpismkeqZ5TGrFwS s+yVIUfNJZZMIDsdUXEKQRd75rP4/KkiL4W0TgS+/MNowylLrvWxw5kBkmjUVimBRkWp QHGOEn1+EtG2Cm1bg6TaKwTCFdtQVjB2Zti/yKKpwNqCrvh27YJBu7mGtSUZTDXkHHdg nmPZKPH2c/HfgtBSwInhd7b8YXDTJzBMPozRmTf5Hmvi+uyguK7CbbsWxJhjJkvX4Gzu nKWzlcEV3S28dC6yyTPqrAQnsXDpFKoTwk46cUHM8BAEsi6TevjfeUjaPnlM+3rrd+f2 tmKg== X-Gm-Message-State: AOUpUlGF3KCfGZ/zHGm/ZsVFg70mrXdkIu/9qz5oeIdZa4vAq89cOlmV EFbprGPi7n7tPqW7ZM331mMPlw== X-Received: by 2002:a6b:249:: with SMTP id 70-v6mr978206ioc.123.1534446711720; Thu, 16 Aug 2018 12:11:51 -0700 (PDT) Received: from [192.168.1.212] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id z195-v6sm61732ioe.38.2018.08.16.12.11.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 12:11:50 -0700 (PDT) Subject: Re: [PATCH] block, bfq: return nbytes and not zero from struct cftype .write() method To: "Maciej S. Szmigiero" , Paolo Valente Cc: linux-block@vger.kernel.org, linux-kernel , Arianna Avanzini References: From: Jens Axboe Message-ID: <19c68f93-017d-cda1-632f-039ca3ca0158@kernel.dk> Date: Thu, 16 Aug 2018 13:11:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/15/18 3:56 PM, Maciej S. Szmigiero wrote: > The value that struct cftype .write() method returns is then directly > returned to userspace as the value returned by write() syscall, so it > should be the number of bytes actually written (or consumed) and not zero. > > Returning zero from write() syscall makes programs like /bin/echo or bash > spin. Applied, thanks. Just a heads-up that gmail thinks your email is spam. -- Jens Axboe