Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751450AbVIVIfK (ORCPT ); Thu, 22 Sep 2005 04:35:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751451AbVIVIfJ (ORCPT ); Thu, 22 Sep 2005 04:35:09 -0400 Received: from [194.90.79.130] ([194.90.79.130]:40710 "EHLO argo2k.argo.co.il") by vger.kernel.org with ESMTP id S1751450AbVIVIfI (ORCPT ); Thu, 22 Sep 2005 04:35:08 -0400 Message-ID: <43326CB3.8080607@argo.co.il> Date: Thu, 22 Sep 2005 11:34:59 +0300 From: Avi Kivity User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Karthik Sarangan CC: linux-kernel@vger.kernel.org Subject: Re: O_DIRECT for block device References: <4332697C.7070409@cdac.in> In-Reply-To: <4332697C.7070409@cdac.in> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Sep 2005 08:35:04.0280 (UTC) FILETIME=[87936580:01C5BF50] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 580 Lines: 16 Karthik Sarangan wrote: > I have a scsi hdd configured at /dev/sdb. > > open("/dev/sdb", O_DIRECT) succeeds. > A 'read' or 'write' returns -1 and errno is EINVAL. > > How to read and write data to it? They do not seem to work. I have a > 262144 byte buffer for data transfer. make sure your buffer is aligned on a 512 byte boundary. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/