From mboxrd@z Thu Jan 1 00:00:00 1970 From: "LIOU Payphone" Subject: ask for help, a question about ext3_ioctl() Date: Thu, 25 Oct 2007 10:30:14 +0800 Message-ID: <001d01c816ae$fe5a23e0$fb0e6ba0$@com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT To: Return-path: Received: from rv-out-0910.google.com ([209.85.198.185]:7195 "EHLO rv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753507AbXJYCac convert rfc822-to-8bit (ORCPT ); Wed, 24 Oct 2007 22:30:32 -0400 Received: by rv-out-0910.google.com with SMTP id k20so345878rvb for ; Wed, 24 Oct 2007 19:30:31 -0700 (PDT) Content-Language: zh-cn Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org hello, everyone. I am puzzled when reading the function named ext3_ioctl(). In the branch named EXT3_IOC_SETFLAGS, inode->mutex was lock firstly, a handle with 1 journal-blocks was started consequently by calling ext3_journal_start(). i investigated the code of ext3_journal_start(), found that if there were no journal blocks left at it happens the process who call ext3_journal_start would be hung up unless some journal block were released. i want to confirm whether such a situation would happen : there are no journal blocks left when ext3_journal_start() called and other processes could not release the journal blocks they currently holding for an unkown reason. so, when a process who called ext3_ioctl with command "EXT3_IOC_SETFLAGS" will be hung up even though the inode->i_mutex was of locked. in such a situation, the inode->i_mutex would not be released. a potential deadlock comes on? many thanks . :-)