Re: [PATCH] Btrfs: cleanup transaction starting and fix current->journal_info setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 05, 2009 at 10:08:11AM -0800, Sage Weil wrote:
> On Tue, 3 Nov 2009, Josef Bacik wrote:
> 
> > We use journal_info to tell if we're in a nested transaction to make sure we
> > don't commit the transaction within a nested transaction.  We use another
> 
> Might this also make btrfs_start_transaction() safe to call when another 
> transaction is already open?  (i.e., let us choose between START and JOIN 
> to avoid wait_current_trans() if journal_info != NULL?)
> 
> If so, that would nicely solve the deadlocks with the alternate 
> transaction ioctl I'm putting together (and, if we drop the current ioctl, 
> make the existing open_ioctl_trans counter and associated checks go away).  
> I was looking at adding something to current->fs (struct fs_struct) to 
> flag if we're part of a user transaction, but if journal_info is already 
> being used that would be much cleaner.
> 

We talked about this on IRC, there are some cases where we specifically want the
join semantics since its an operation that is performance critical and may
really need to be done without waiting for the transaction to finish and not be
an actual embedded transaction.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux