From owner-freebsd-hackers@freebsd.org Mon Jan 16 02:55:33 2017 Return-Path: Delivered-To: freebsd-hackers@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 2AAB4CB1233 for ; Mon, 16 Jan 2017 02:55:33 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E51C51A5E for ; Mon, 16 Jan 2017 02:55:32 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id DFBC213099 for ; Mon, 16 Jan 2017 02:55:30 +0000 (UTC) Subject: Re: Understanding the rationale behind dropping of "block devices" To: freebsd-hackers@freebsd.org References: From: Allan Jude Message-ID: Date: Sun, 15 Jan 2017 21:55:26 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xVhWjCEJP500c8JXVws17Lsxf2InQgcoF" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 02:55:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xVhWjCEJP500c8JXVws17Lsxf2InQgcoF Content-Type: multipart/mixed; boundary="4tbpeD3TsedFMNVkNAJ8NgkITvKxdeetv"; protected-headers="v1" From: Allan Jude To: freebsd-hackers@freebsd.org Message-ID: Subject: Re: Understanding the rationale behind dropping of "block devices" References: In-Reply-To: --4tbpeD3TsedFMNVkNAJ8NgkITvKxdeetv Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017-01-15 21:40, Aijaz Baig wrote: > I am a relative noob to the storage world in general and FreeBSD in > particular. OF what I have been learning of late, I have become somewha= t > familiar with such concepts like disk queuing, IOPs, latencies and the = likes > I am also reading the classic 'The design and implementation of the Fre= eBSD > operating system'. However of what I am reading, FreeBSD has "done away= " > with "block devices" altogether >=20 > Of what I have been reading in that book and elsewhere it appears that = the > "block" devices have been dropped out of the architecture. So what I, w= ith > my (still) very limited knowledge of storage, understand this as there = are > no drivers in FreeBSD that would deal with blocks of data. >=20 > But when I check the disk nodes under /dev I get this > [CODE]ls -l /dev/*disk0 > brw-r----- 1 root operator 14, 0 Jan 2 09:39 /dev/disk0 > crw-r----- 1 root operator 14, 0 Jan 2 09:39 /dev/rdisk0[/CODE] >=20 > where 'b' means block interface and 'c' means char or raw interface. So= how > do I reconcile this with what I read about "block devices being gone" > before. What does 'block' mean here? >=20 > Of what I know, the block device would be served through the "page cach= e" > (a place where file system caches it's data and meta data) where as the= raw > device would be served via the "buffer cache" where "disk blocks" are > cached by the OS. Thus a block device would be served via the file syst= em > where as the raw device won't. Is this correct?? If yes, then what does= > 'block' above signify? Or rephrasing the question, what was there earli= er > in FreeBSD before 'block device support' was dropped? >=20 > I am sure seasoned storage veterans would have a lot more to add. I wou= ld > be highly obliged if some one could please elaborate and add more conte= xt > to it. >=20 What version of FreeBSD are you using? All modern versions of FreeBSD have no 'block' devices, and use different device names than you included in your pasted message. crw-r----- 1 root operator 0x92 Jul 27 04:44 /dev/ada0 crw-r----- 1 root operator 0xa2 Jul 27 04:44 /dev/ada1 crw-r----- 1 root operator 0xad Jul 27 04:44 /dev/da0 crw-r----- 1 root operator 0xae Jul 27 04:44 /dev/da1 (SATA disks are /dev/ada* and SAS/SCSI/USB/etc are /dev/da*) --=20 Allan Jude --4tbpeD3TsedFMNVkNAJ8NgkITvKxdeetv-- --xVhWjCEJP500c8JXVws17Lsxf2InQgcoF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJYfDYhAAoJEBmVNT4SmAt+HgsQAIu3BjLFVY0m2EkjuOVr4X0O M1ECqJfyoYxEPhtGC/pcn+zyK9i+XNznszacJqOcN6aAAO5sp4Z1bIu+PwnMuU4Y ps4JTi2dIfQZ5wWVw+6l5lhGRFHrvYf/y2rqLdnFEhQQOezPtxo1fok+3vQyROVS evDJhJ1yZhLRv8gGOeqrrXwGXWCsIaH3AqMr3f5n/+AI16KjjNBC9Myra7iEESgK zN7w2Q2c7O/reFdQdXv80CtQDBMIqAkpjd8+Wf+utGqA28n6khPnUvpJRqrmS6sQ HblZ0NA5GTuao4+LgubP/XDAIoRwHry3zK90VhvTZc25hwAAeGslQJsVEEgsq3Hw T1IjuIP7eFuLSH+GN46I0aCn0HW4mPOmF5uBr3+pETi+9HeLC9QvGN/h5VCHY76L g8fZUTuKW6u3ddYdnhVWFkmN8ayvhgHNVKy/xoUmm0F+xx0r86A04YUAsos/OPjY ocL6o8jDfDecfoavOtkArSI4tEixlvjHXh61q6zZ0XMsj91v6f3niB7avCBk/MqH vz4poWG38Ov9P621d74liq8DMFHLYrgrUNjKUgCsuP0Vn91QPqR5YmGo+ucf4Z8L VFruhGp97FROhzekSSmAxjijZT5wdduWUTLeB3SgUNTCUVaQhHrwLYNnKNwT089j e0Fx9orcowMs1cW2z2HL =3Cm2 -----END PGP SIGNATURE----- --xVhWjCEJP500c8JXVws17Lsxf2InQgcoF--