Re: [zfs-discuss] Contents of transaction group?

2007-04-10 Thread Darren J Moffat

Atul Vidwansa wrote:

Hi,
   I have few questions about the way a transaction group is created.

1. Is it possible to group transactions related to multiple operations
in same group? For example, an "rmdir foo" followed by "mkdir bar",
can these end up in same transaction group?

2. Is it possible for an operation (say write()) to occupie multiple
transaction groups?

3. Is it possible to know the thread id(s) for every commited txg_id?


What problem are you trying to solve here ?

Why do you think it would be useful to know after the fact which threads 
 did operations in a given transaction group ?


--
Darren J Moffat
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Contents of transaction group?

2007-04-09 Thread Toby Thain


On 9-Apr-07, at 8:15 AM, Atul Vidwansa wrote:


Hi,
   I have few questions about the way a transaction group is created.

1. Is it possible to group transactions related to multiple operations
in same group? For example, an "rmdir foo" followed by "mkdir bar",
can these end up in same transaction group?


I began to wonder about doing this with Reiser's filesystems. It's  
certainly an interesting capability to have & I'm looking forward to  
this thread...


--Toby



2. Is it possible for an operation (say write()) to occupie multiple
transaction groups?

3. Is it possible to know the thread id(s) for every commited txg_id?

Regards,
-Atul
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Contents of transaction group?

2007-04-09 Thread Atul Vidwansa

Sanjeev,
Thanks for the response. The thread_ids I was talking about are
userland threads, not the ZFS transaction thread. Is it possible to
know for each commited transaction group, which transactions (id) were
part of it and which syscall or userland thread initiated those
syscalls?

Cheers,
-Atul

On 4/9/07, Sanjeev Bagewadi <[EMAIL PROTECTED]> wrote:

Atul,

Atul Vidwansa wrote:
> Hi,
>I have few questions about the way a transaction group is created.
>
> 1. Is it possible to group transactions related to multiple operations
> in same group? For example, an "rmdir foo" followed by "mkdir bar",
> can these end up in same transaction group?
Each TXG is 5 sec long (in normal cases unless some operation forcefully
closed it).
So, it is quite possible that the 2 syscalls can end up in the same TXG.
But, is not guaranteed.

If it has to be guaranteed then this logic will have to be built into
the VNODE ops code. ie. ZPL
code. However, that would be tricky as rmdir and mkdir are 2 different
syscalls and I am not sure what locking
issues you would need to take care.
>
> 2. Is it possible for an operation (say write()) to occupie multiple
> transaction groups?
Yes.
>
> 3. Is it possible to know the thread id(s) for every commited txg_id?
The TXG is always synced by the txg threads. Not sure why you want it.

Regards,
Sanjeev.

>
> Regards,
> -Atul
> ___
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


--
Solaris Revenue Products Engineering,
India Engineering Center,
Sun Microsystems India Pvt Ltd.
Tel:x27521 +91 80 669 27521



___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Contents of transaction group?

2007-04-09 Thread Sanjeev Bagewadi

Atul,

Atul Vidwansa wrote:

Hi,
   I have few questions about the way a transaction group is created.

1. Is it possible to group transactions related to multiple operations
in same group? For example, an "rmdir foo" followed by "mkdir bar",
can these end up in same transaction group?
Each TXG is 5 sec long (in normal cases unless some operation forcefully 
closed it).
So, it is quite possible that the 2 syscalls can end up in the same TXG. 
But, is not guaranteed.


If it has to be guaranteed then this logic will have to be built into 
the VNODE ops code. ie. ZPL
code. However, that would be tricky as rmdir and mkdir are 2 different 
syscalls and I am not sure what locking

issues you would need to take care.


2. Is it possible for an operation (say write()) to occupie multiple
transaction groups?

Yes.


3. Is it possible to know the thread id(s) for every commited txg_id?

The TXG is always synced by the txg threads. Not sure why you want it.

Regards,
Sanjeev.



Regards,
-Atul
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss



--
Solaris Revenue Products Engineering,
India Engineering Center,
Sun Microsystems India Pvt Ltd.
Tel:x27521 +91 80 669 27521 


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss