Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp372235ybl; Wed, 11 Dec 2019 00:52:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwyiqYOBHRqNU/hAm42WMHQGxeOJytB4ziwhg6fllkIir65DNVHu/jOQ2oFPc6XpBazuP45 X-Received: by 2002:a54:4895:: with SMTP id r21mr1962036oic.107.1576054368548; Wed, 11 Dec 2019 00:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576054368; cv=none; d=google.com; s=arc-20160816; b=AYRJ5Gm0s/DbfQXhgcybifYuWNE6qaHRwYJCNBfINkeY/2Qr5c7RTMHT6NJItgvaS7 2LM3O6klbhhRFefBgElMp7MpmQU7B0BmQLx4h5zclvcYr6PgoCcJz022KRdNWxqqldLc iZ6X21EFe3g6ZuiX6Ul/DYM2mvO3HEcLAjD/DEqeUZ9AMY8G5fkmGlYj5O3OMFPaxDTv /fRYYeZO356+pxcNMthD1YeUNqUVk+2E6+snc3u8shxc2ctfKVd37t+NeWqCwU5yz4JL nHg/9wV9yA9CRY/ng9te0mIEoeBfwHuJcnR1G54cAoEx13kHG0vMTOkyIwKHeCgVt7/Q /Isw== 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; bh=Ors3lvyazmsqqnQI16mBNFlWcY4Sz7cvimJhl6HA2vs=; b=Ufu/7143QsCWjXydIBzpQqm2ntos+9EaUkzfErsFmmgD9BTnfSPYA7RUcqYATC4qIw fxaMh8mGm6T/kCFDuCxSQZEj08heod1/NNxNSCp7K8GqAQV/2+gP+Z29QGpo/VUaXcSs mxZFK48o5xPizsXSw+St94uTIW2sMeqy25TCs8LxSM1rQDQHuXD7aGye9X+3B+nsabyt cN2i8VtTixkpZPl2IL7zSj4Z4ezpr8DpOt5fWJgH/jGWMOXKTrlKQMHwEL2ggB6x+Nxp RwCXOFlUAavDJQYzjqDNHj/5XT4Ayb9nf/5c9Hpohow+c2YoaGfS3yJmaez53DDIG+eT vf7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14si632660otk.237.2019.12.11.00.52.33; Wed, 11 Dec 2019 00:52:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbfLKIvy (ORCPT + 99 others); Wed, 11 Dec 2019 03:51:54 -0500 Received: from relay.sw.ru ([185.231.240.75]:37430 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbfLKIvy (ORCPT ); Wed, 11 Dec 2019 03:51:54 -0500 Received: from dhcp-172-16-24-104.sw.ru ([172.16.24.104]) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1iexhs-000496-Vm; Wed, 11 Dec 2019 11:50:53 +0300 Subject: Re: [PATCH RFC 0/3] block,ext4: Introduce REQ_OP_ASSIGN_RANGE to reflect extents allocation in block device internals To: Chaitanya Kulkarni , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-ext4@vger.kernel.org" Cc: "axboe@kernel.dk" , "tytso@mit.edu" , "adilger.kernel@dilger.ca" , "ming.lei@redhat.com" , "osandov@fb.com" , "jthumshirn@suse.de" , "minwoo.im.dev@gmail.com" , Damien Le Moal , "andrea.parri@amarulasolutions.com" , "hare@suse.com" , "tj@kernel.org" , Ajay Joshi , "sagi@grimberg.me" , "dsterba@suse.com" , "bvanassche@acm.org" , "dhowells@redhat.com" , "asml.silence@gmail.com" References: <157599668662.12112.10184894900037871860.stgit@localhost.localdomain> From: Kirill Tkhai Message-ID: Date: Wed, 11 Dec 2019 11:50:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.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-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 11.12.2019 10:42, Chaitanya Kulkarni wrote: >> Here is a simple test I did: >> https://gist.github.com/tkhai/5b788651cdb74c1dbff3500745878856 >> > > Somehow I'm not able to open this link, can you please share results > in plain text on the email ? #define _GNU_SOURCE #include #include #include #include #include #include #define BLOCK_SIZE 4096 #define STEP (BLOCK_SIZE * 16) #define SIZE (4ULL * 1024 * 1024 * 1024) int main(int argc) { int fd, step, ret = 0; unsigned long i; void *buf; if (posix_memalign(&buf, BLOCK_SIZE, SIZE)) { perror("alloc"); exit(1); } fd = open("file2.img", O_RDWR|O_CREAT|O_DIRECT); if (fd < 0) { perror("open"); exit(1); } if (ftruncate(fd, SIZE)) { perror("ftruncate"); exit(1); } ret = fallocate(fd, 0, 0, SIZE); if (ret) { perror("fallocate"); exit(1); } for (step = STEP - BLOCK_SIZE; step >= 0; step -= BLOCK_SIZE) { printf("step=%u\n", step); for (i = step; i < SIZE; i += STEP) { errno = 0; if (pwrite(fd, buf, BLOCK_SIZE, i) != BLOCK_SIZE) { perror("pwrite"); exit(1); } } if (fsync(fd)) { perror("fsync"); exit(1); } } return 0; }