From owner-freebsd-scsi@freebsd.org Mon Jan 16 02:40:20 2017 Return-Path: Delivered-To: freebsd-scsi@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 0E23ECB2D87; Mon, 16 Jan 2017 02:40:20 +0000 (UTC) (envelope-from aijazbaig1@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BBC61FC5; Mon, 16 Jan 2017 02:40:19 +0000 (UTC) (envelope-from aijazbaig1@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id c206so155334187wme.0; Sun, 15 Jan 2017 18:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=IkUw+lRenFwsponY9eox5D3RbhR1NjEGnbcBVFyhyBw=; b=ja7L/wguo0HfsbwJSmM7OfMgYejiRX0xRo9rZkeODwuK1GsbWiI2pT8mBJkWD5RZpz Ziz2AEXxjwd2EzAFEJj1wU66H08FbU3dM5zAFfzVfBmSw2+lcos5XOUqfZgZ34CiQM58 JOI7AKA7jomqFS/Qe54alTwTOLyJblTNlBYtG8KuHEN/Syla8LXTFRHhgSq0vMjwuZBh I92jlnbQ6V2uqyEJtWFFcjo9IvSm/Ul2QxZfsf+ukb5KvZRBCiHkUCNFgoUdEZ0CzZ+O /SqWY2ZLFEucNV5Zk+92e5pqxkBQ+OpzDo58VCH04sLZNVdUVccL8N8EnCuYUE9AM1BH lAuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IkUw+lRenFwsponY9eox5D3RbhR1NjEGnbcBVFyhyBw=; b=tykdDJo5qCoOXZks6Dsqhx10xt4VdPFnjAmAy5EdsgwEPrxGWlYO29dLtTMhbSZOnR B0DN63LR00FHdwz4U0zzbdVfSojQeM5vVgx//W0y414MBmMpzVUEEMZfumFkIh5qEOOq dHL9bzXdiZVQUu666IDPHvwHA5DDlqgyttXE8hgLybxnBERpIPC2PORdKx8MoaMM9pYl eGfHuvIKeRavFWvSRFl1lw9AC2+n2tQPiR79wlx0cyEVi5a4SvYq7jOvUFUnGrc1RLca y4mix6aKlPOnQ+ah53SohlzgnLDagWh2T3hxDvDRsb8M/YWaGpdJkKn6HXeilEqI4D8s eXoQ== X-Gm-Message-State: AIkVDXJDuGU6D5c8FO85MA4hkTlLYnsKrtU2ktmVEKQL2BwVJG94yvWWH9qcL4bxzUjdJCYko/R5V5cHAn4WFQ== X-Received: by 10.28.41.5 with SMTP id p5mr11353083wmp.38.1484534417292; Sun, 15 Jan 2017 18:40:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.195.12.46 with HTTP; Sun, 15 Jan 2017 18:40:16 -0800 (PST) From: Aijaz Baig Date: Mon, 16 Jan 2017 08:10:16 +0530 Message-ID: Subject: Understanding the rationale behind dropping of "block devices" To: FreeBSD Hackers , freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 02:40:20 -0000 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 somewhat familiar with such concepts like disk queuing, IOPs, latencies and the likes I am also reading the classic 'The design and implementation of the FreeBSD operating system'. However of what I am reading, FreeBSD has "done away" with "block devices" altogether 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, with my (still) very limited knowledge of storage, understand this as there are no drivers in FreeBSD that would deal with blocks of data. 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] 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? Of what I know, the block device would be served through the "page cache" (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 system 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 earlier in FreeBSD before 'block device support' was dropped? I am sure seasoned storage veterans would have a lot more to add. I would be highly obliged if some one could please elaborate and add more context to it. -- Best Regards, Aijaz Baig