}
void
-platform_flush_device(int fd)
+platform_flush_device(int fd, dev_t device)
{
ioctl(fd, DKIOCSYNCHRONIZECACHE, NULL);
}
void
platform_set_blocksize(int fd, char *path, int blocksize)
{
+ return;
}
void
-platform_flush_device(int fd)
+platform_flush_device(int fd, dev_t device)
{
+ return;
}
void
dev_map[d].dev = dev_map[d].fd = 0;
fsync(fd);
- platform_flush_device(fd);
+ platform_flush_device(fd, dev);
close(fd);
return;
/*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
struct stat64 *sptr, int fatal);
extern void platform_findsizes (char *path, int fd, long long *sz, int *bsz);
extern void platform_set_blocksize (int fd, char *path, int blocksize);
-extern void platform_flush_device (int fd);
+extern void platform_flush_device (int fd, dev_t device);
#endif /* LIBXFS_INIT_H */
}
void
-platform_flush_device(int fd)
+platform_flush_device(int fd, dev_t device)
{
return;
}
# define BLKSSZGET _IO(0x12,104)
#endif
+#ifndef RAMDISK_MAJOR
+#define RAMDISK_MAJOR 1 /* ramdisk major number */
+#endif
+
#define PROC_MOUNTED "/proc/mounts"
int
}
void
-platform_flush_device(int fd)
+platform_flush_device(int fd, dev_t device)
{
- ioctl(fd, BLKFLSBUF, 0);
+ if (major(device) != RAMDISK_MAJOR)
+ ioctl(fd, BLKFLSBUF, 0);
}
void