From owner-freebsd-fs@freebsd.org Sat Oct 1 19:52:05 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BDBAA947B6 for ; Sat, 1 Oct 2016 19:52:05 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from hz.citrin.ru (hz.citrin.ru [88.198.212.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00E7683A for ; Sat, 1 Oct 2016 19:52:04 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from [192.168.0.144] (c-24-60-168-172.hsd1.ct.comcast.net [24.60.168.172]) (Authenticated sender: citrin@citrin.ru) by hz.citrin.ru (Postfix) with ESMTPSA id 18941286BDC; Sat, 1 Oct 2016 19:51:54 +0000 (UTC) Subject: Re: UFS: unaligned read from GELI with 8k sectorsize To: Konstantin Belousov References: <20161001114536.GX38409@kib.kiev.ua> Cc: "freebsd-fs@freebsd.org" From: Anton Yuzhaninov Message-ID: Date: Sat, 1 Oct 2016 15:51:38 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161001114536.GX38409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrin.ru; s=s0; t=1475351515; bh=j5UO6r2fRZfPcb0+jqs5N0fGAT8TXQm+ag1uVqMTB4k=; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=oW8EVtZSznMkpZG03k2P2NRAY94R7kgtA9P/Yprh6O4DWDEJSlY9PtLNlMJ7ucKEt6CD/MQuRa88GJqTQqunMwlmvkeEjEu0VWP7ZvHvZqXzOaBgKq/b8EI4oj3dyH6Tk3pKfnYnXnCZxVB1F8nJjxE64nfYWkrSz9g7BoOAGjs= X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 19:52:05 -0000 On 2016-10-01 07:45, Konstantin Belousov wrote: > On Sat, Oct 01, 2016 at 12:42:09AM -0400, Anton Yuzhaninov wrote: > FreeBSD vnode pager assumes that it can read at page granularity. > Since x86 page size is 4k, sometimes page-in has to occur not on the > fragment boundary. In other words, fragment size > 4k are effectively > not supported. You mean that geom sector size > 4k is not supported? UFS with 8k fragment should work (over geom provider with sector size <= 4k). > Boot needs to execute files from the root mount, which results in the > mmap(2) attempts on your file system. While mount and reads/writes do > not involve the pager, which does not trigger further bugs in the > buffer cache code. It should break if you try to execute badly aligned > ELF binary from your stick, or just mmap() a file from the stick with > non-8k aligned offset. Thank you for detailed answer!