From owner-freebsd-geom@FreeBSD.ORG Mon Sep 24 06:20:33 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A65F1065674 for ; Mon, 24 Sep 2012 06:20:33 +0000 (UTC) (envelope-from jacks.1785@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 022EA8FC08 for ; Mon, 24 Sep 2012 06:20:32 +0000 (UTC) Received: by ieak10 with SMTP id k10so9797299iea.13 for ; Sun, 23 Sep 2012 23:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CpRAoM9Yh0SrNhHk8iOGgeMnoOpgnMp9YjYxs1lCVXs=; b=WDF1by+gv2GF8dboBUZLmNZBCu++/O0/yUglIuSv1Q92VtPrm0jSRLaqfEAXeAlMyK PvNUWye85pciDRMOeAU+zVrakmsGn4PsAVHnPMIwKQIzRyQT0xGcyETuFNWpA7PFlFM/ UgPIPW8B6YxC0JHT7RI2ZyQjr4G9Sv83aOWMUapy/U57ocwKp5d0RzDkW0ZLopkheLKk nz7FvqBUc0XEVayI+Kj1dDJElprZ6iaG2ttxMlipYDhespq1ncB5X7faS7oQe8q6ieKw 7g0x471Ef7E6rgxVg7kjlQKwV8ZWk0YT8ioaGixQSj+YSnJSfnZEEn6etcOwahHFZs0c Y8Kw== MIME-Version: 1.0 Received: by 10.50.180.169 with SMTP id dp9mr4317490igc.8.1348467632170; Sun, 23 Sep 2012 23:20:32 -0700 (PDT) Received: by 10.64.44.105 with HTTP; Sun, 23 Sep 2012 23:20:32 -0700 (PDT) In-Reply-To: References: Date: Mon, 24 Sep 2012 11:50:32 +0530 Message-ID: From: Jack To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: GEOM and CAM pass behaviour X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 06:20:33 -0000 Hi again, On Sat, Sep 22, 2012 at 9:50 AM, Jack wrote: > Hi all, > > I would like to know 2 things regarding geom and cam pass driver > behaviour. It would be helpful if someone could educate me regarding > this. > > Consider the case where a scsi/ata tape/hard drive is attached to the > system after the FreeBSD is booted(from different drive) completely. > > > 1. Is it true that GEOM layer will always taste the (hard drive/tape > drive)device whether we access device via cam pass driver or do block > access. In other words, say if we never do a block access on the > selected device, and we only access this device via cam pass driver, > will then Geom will ever have to taste(e.g. for partition table, etc. > or for other purposes) this > device.? > > or is it something like, as soon as the device is attached, geom layer > will always taste it - it doesn't matter how we access the device. > > 2. Also, is it possible that while a process is accessing the selected > device via cam pass driver, the block access is also possible at that > same time, (by same or different process) to that same device. > I know that when a process is accessing the device via block access, > it is possible for another(or even same) process to access that same > device via cam pass driver, but I would like to know whether the other > way is true also. > > > Thanks. > -- > Jack It seems that two or more processes can access a same device via cam pass driver, and the block access is also possible at that same time, (by same or different process) to that same device. Queueing is done at HBA driver layer. But I'm not confirmed about GEOM tasting scene. Is there a way so that a da/ada/sa device is not created for a particular device, leaving only pass device, so that this device is accessible only via cam pass driver and not via geom/block layer. Actually I'm developing a userland utility, and my intent is that a particular ata/scsi device attached to the system( after Freebsd is booted completely), is accessible only via cam pass driver(ie via pass device), and not via geom/block layer(ie via da/ada/sa) driver. The device is selected by the user of utility. Any suggestions, or approaches would be helpful. Regards. -- Jack