Documentation on Replacement of Deprecated O_SYNC_* FS flags/calls

Previous thread: [PATCH] fanotify: Return EPERM when a process is not privileged by Andreas Gruenbacher on Tuesday, August 24, 2010 - 3:58 am. (1 message)

Next thread: [PATCH 0/3] Trap and propagate divide errors when emulating DIV by Avi Kivity on Tuesday, August 24, 2010 - 4:10 am. (8 messages)
From: Gordan Bobic
Date: Tuesday, August 24, 2010 - 3:59 am

Hi,

I'm trying to port e2compr patches to 2.6.35.2, and I've run into the 
following issue. The code here, that I need to patch into fs/ext2/file.c:

=============
if (status >= 0) {
	if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) {
		if (ei->i_compr_flags & EXT2_OSYNC_INODE) {
			osync_already = 1;
		} else {
			osync_already = 0;
			ei->i_compr_flags |= EXT2_OSYNC_INODE;
		}

		/* Should 2nd arg be inode->i_mapping? */
		status = generic_osync_inode(inode, file->f_mapping,
			OSYNC_METADATA|OSYNC_DATA);
		if (osync_already == 0) {
			ei->i_compr_flags &= ~EXT2_OSYNC_INODE;
		}
	}
}
=============

uses the deprecated O_SYNC_* flags that have been deprecated and removed 
around the 2.6.31 era. Is there any documentation available on the new 
way this should be done?

Many thanks.

Gordan
--

Previous thread: [PATCH] fanotify: Return EPERM when a process is not privileged by Andreas Gruenbacher on Tuesday, August 24, 2010 - 3:58 am. (1 message)

Next thread: [PATCH 0/3] Trap and propagate divide errors when emulating DIV by Avi Kivity on Tuesday, August 24, 2010 - 4:10 am. (8 messages)