Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964949AbVINUg4 (ORCPT ); Wed, 14 Sep 2005 16:36:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964982AbVINUg4 (ORCPT ); Wed, 14 Sep 2005 16:36:56 -0400 Received: from NS6.Sony.CO.JP ([137.153.0.32]:25825 "EHLO ns6.sony.co.jp") by vger.kernel.org with ESMTP id S964949AbVINUgz (ORCPT ); Wed, 14 Sep 2005 16:36:55 -0400 Message-ID: <43288964.7020307@sm.sony.co.jp> Date: Thu, 15 Sep 2005 05:34:44 +0900 From: "Machida, Hiroyuki" User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: ja, en-us, en MIME-Version: 1.0 To: hirofumi@mail.parknet.co.jp CC: linux-kernel@vger.kernel.org Subject: [PATCH 1/2][FAT] miss-sync issues on sync mount (miss-sync on write) Content-Type: multipart/mixed; boundary="------------010405060400050301050908" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4149 Lines: 72 This is a multi-part message in MIME format. --------------010405060400050301050908 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit This patch fixes miss-sync issue on write() system call. This updates inode attrs flags, mtime and ctime on every comit_write call, due to locking. --- Hiroyuki Machida --------------010405060400050301050908 Content-Type: text/plain; name="fat-sync-write.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="fat-sync-write.patch" U2lnbmVkLW9mZi1ieTogSGlyb3l1a2kgTWFjaGlkYSA8bWFjaGlkYUBzbS5zb255LmNvLmpw PgogLS0tCgogZmlsZS5jICB8ICAgMjAgKy0tLS0tLS0tLS0tLS0tLS0tLS0KIGlub2RlLmMg fCAgIDIxICsrKysrKysrKysrKysrKysrKysrLQogMiBmaWxlcyBjaGFuZ2VkLCAyMSBpbnNl cnRpb25zKCspLCAyMCBkZWxldGlvbnMoLSkKCgotLS0gbGludXgtMi42LjEzLm9yZy9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aV9jdGltZSA9IENVUlJFTlRfVElN RV9TRUM7Ci0JCU1TRE9TX0koaW5vZGUpLT5pX2F0dHJzIHw9IEFUVFJfQVJDSDsKLQkJbWFy a19pbm9kZV9kaXJ0eShpbm9kZSk7Ci0vLwkJY2hlY2sgdGhlIGxvY2tpbmcgcnVsZXMKLS8v CQlpZiAoSVNfU1lOQyhpbm9kZSkpCi0vLwkJCWZhdF9zeW5jX2lub2RlKGlub2RlKTsKLQl9 Ci0JcmV0dXJuIHJldHZhbDsKLX0KLQogc3RhdGljIHNzaXplX3QgZmF0X2ZpbGVfd3JpdGV2 KHN0cnVjdCBmaWxlICpmaWxwLCBjb25zdCBzdHJ1Y3QgaW92ZWMgKmlvdiwKIAkJCSAgICAg ICB1bnNpZ25lZCBsb25nIG5yX3NlZ3MsIGxvZmZfdCAqcHBvcykKIHsKQEAgLTE1MCw3ICsx MzIsNyBAQCBzdHJ1Y3QgZmlsZV9vcGVyYXRpb25zIGZhdF9maWxlX29wZXJhdGlvCiAJLnJl YWR2CQk9IGdlbmVyaWNfZmlsZV9yZWFkdiwKIAkud3JpdGV2CQk9IGZhdF9maWxlX3dyaXRl diwKIAkuYWlvX3JlYWQJPSBnZW5lcmljX2ZpbGVfYWlvX3JlYWQsCi0JLmFpb193cml0ZQk9 IGZhdF9maWxlX2Fpb193cml0ZSwKKwkuYWlvX3dyaXRlCT0gZ2VuZXJpY19maWxlX2Fpb193 cml0ZSwKIAkubW1hcAkJPSBnZW5lcmljX2ZpbGVfbW1hcCwKIAkuaW9jdGwJCT0gZmF0X2dl bmVyaWNfaW9jdGwsCiAJLmZzeW5jCQk9IGZpbGVfZnN5bmMsCg== --------------010405060400050301050908-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/