From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756872Ab0ITQSY (ORCPT ); Mon, 20 Sep 2010 12:18:24 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:34199 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275Ab0ITQSX convert rfc822-to-8bit (ORCPT ); Mon, 20 Sep 2010 12:18:23 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ZZB/MVF8DMLhd3SSivxLtiALD/RgAmaMwFqAptJPvOqaf5M8On52bjzEiIedwoEXfd UPFUoctH2yIdUq6m0Hwvf5vP4Rt6nJMrjbCqYlnb7sWTg+nsDnqsQUI7aEbzuL8bfeVV OBslNK/Q/NBAogcjgagk5PCnhi8trONraE10o= MIME-Version: 1.0 In-Reply-To: <1283160144-6848-1-git-send-email-nab@linux-iscsi.org> References: <1283160144-6848-1-git-send-email-nab@linux-iscsi.org> Date: Mon, 20 Sep 2010 18:18:21 +0200 Message-ID: Subject: Re: [RFC 15/22] tcm: Add FILEIO subsystem plugin From: Fubo Chen To: "Nicholas A. Bellinger" Cc: linux-scsi , linux-kernel , FUJITA Tomonori , Mike Christie , Christoph Hellwig , Hannes Reinecke , James Bottomley , Jens Axboe , Boaz Harrosh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 30, 2010 at 11:22 AM, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch adds the O_SYNC FILEIO subsystem plugin for accessing struct file > using Linux/VFS struct file_operations.  It also includes WriteCache and FUA > Write Emulation support to struct file using fs/sync.c/vfs_fsync_range() > > Signed-off-by: Nicholas A. Bellinger > > [ ... ] > > +static int fd_do_writev(struct fd_request *req, struct se_task *task) > +{ > +       struct file *fd = req->fd_dev->fd_file; > +       struct scatterlist *sg = task->task_sg; > +       struct iovec iov[req->fd_sg_count]; Kernel stack size is 8 KB. On a 64-bit system struct iovec takes 16 bytes. What happens if req->fd_sg_count is large ? Kernel crash ? Fubo.