LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Add explanation of I_DIRTY_DATASYNC bit
@ 2008-02-06 16:29 Jan Kara
2008-02-06 16:35 ` Andreas Schwab
2008-02-06 16:56 ` Jan Kara
0 siblings, 2 replies; 4+ messages in thread
From: Jan Kara @ 2008-02-06 16:29 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Add explanation of I_DIRTY_DATASYNC bit.
Signed-off-by: Jan Kara <jack@suse.cz>
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 56bd421..475125e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1280,7 +1280,10 @@ struct super_operations {
* Two bits are used for locking and completion notification, I_LOCK and I_SYNC.
*
* I_DIRTY_SYNC Inode itself is dirty.
- * I_DIRTY_DATASYNC Data-related inode changes pending
+ * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
+ * ` these changes separately from I_DIRTY_SYNC so that we
+ * don't have to write inode on fdatasync() when only
+ * mtime has changed in it.
* I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean.
* I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both
* are cleared by unlock_new_inode(), called from iget().
@@ -1312,8 +1315,6 @@ struct super_operations {
* purpose reduces latency and prevents some filesystem-
* specific deadlocks.
*
- * Q: Why does I_DIRTY_DATASYNC exist? It appears as if it could be replaced
- * by (I_DIRTY_SYNC|I_DIRTY_PAGES).
* Q: What is the difference between I_WILL_FREE and I_FREEING?
* Q: igrab() only checks on (I_FREEING|I_WILL_FREE). Should it also check on
* I_CLEAR? If not, why?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add explanation of I_DIRTY_DATASYNC bit
2008-02-06 16:29 [PATCH] Add explanation of I_DIRTY_DATASYNC bit Jan Kara
@ 2008-02-06 16:35 ` Andreas Schwab
2008-02-06 16:54 ` Jan Kara
2008-02-06 16:56 ` Jan Kara
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2008-02-06 16:35 UTC (permalink / raw)
To: Jan Kara; +Cc: Andrew Morton, linux-kernel
Jan Kara <jack@suse.cz> writes:
> Add explanation of I_DIRTY_DATASYNC bit.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 56bd421..475125e 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -1280,7 +1280,10 @@ struct super_operations {
> * Two bits are used for locking and completion notification, I_LOCK and I_SYNC.
> *
> * I_DIRTY_SYNC Inode itself is dirty.
> - * I_DIRTY_DATASYNC Data-related inode changes pending
> + * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
> + * ` these changes separately from I_DIRTY_SYNC so that we
^
Looks like a typo.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add explanation of I_DIRTY_DATASYNC bit
2008-02-06 16:35 ` Andreas Schwab
@ 2008-02-06 16:54 ` Jan Kara
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2008-02-06 16:54 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Andrew Morton, linux-kernel
On Wed 06-02-08 17:35:39, Andreas Schwab wrote:
> Jan Kara <jack@suse.cz> writes:
>
> > Add explanation of I_DIRTY_DATASYNC bit.
> >
> > Signed-off-by: Jan Kara <jack@suse.cz>
> >
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 56bd421..475125e 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
> > @@ -1280,7 +1280,10 @@ struct super_operations {
> > * Two bits are used for locking and completion notification, I_LOCK and I_SYNC.
> > *
> > * I_DIRTY_SYNC Inode itself is dirty.
> > - * I_DIRTY_DATASYNC Data-related inode changes pending
> > + * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
> > + * ` these changes separately from I_DIRTY_SYNC so that we
> ^
>
> Looks like a typo.
Oh, OK. Thanks for spotting this. Just next to tab ;). I'll resend a
patch without the typo.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Add explanation of I_DIRTY_DATASYNC bit
2008-02-06 16:29 [PATCH] Add explanation of I_DIRTY_DATASYNC bit Jan Kara
2008-02-06 16:35 ` Andreas Schwab
@ 2008-02-06 16:56 ` Jan Kara
1 sibling, 0 replies; 4+ messages in thread
From: Jan Kara @ 2008-02-06 16:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Add explanation of I_DIRTY_DATASYNC bit.
Signed-off-by: Jan Kara <jack@suse.cz>
---
Fixed a typo...
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 56bd421..475125e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1280,7 +1280,10 @@ struct super_operations {
* Two bits are used for locking and completion notification, I_LOCK and I_SYNC.
*
* I_DIRTY_SYNC Inode itself is dirty.
- * I_DIRTY_DATASYNC Data-related inode changes pending
+ * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
+ * these changes separately from I_DIRTY_SYNC so that we
+ * don't have to write inode on fdatasync() when only
+ * mtime has changed in it.
* I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean.
* I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both
* are cleared by unlock_new_inode(), called from iget().
@@ -1312,8 +1315,6 @@ struct super_operations {
* purpose reduces latency and prevents some filesystem-
* specific deadlocks.
*
- * Q: Why does I_DIRTY_DATASYNC exist? It appears as if it could be replaced
- * by (I_DIRTY_SYNC|I_DIRTY_PAGES).
* Q: What is the difference between I_WILL_FREE and I_FREEING?
* Q: igrab() only checks on (I_FREEING|I_WILL_FREE). Should it also check on
* I_CLEAR? If not, why?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-06 16:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-06 16:29 [PATCH] Add explanation of I_DIRTY_DATASYNC bit Jan Kara
2008-02-06 16:35 ` Andreas Schwab
2008-02-06 16:54 ` Jan Kara
2008-02-06 16:56 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).