Bug 8750 - on solaris writing extended attributes causes mtime update
Summary: on solaris writing extended attributes causes mtime update
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.6.3
Hardware: All Solaris
: P5 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-08 13:58 UTC by Björn Jacke
Modified: 2012-08-13 13:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2012-02-08 13:58:04 UTC
on solaris writing extended attributes causes mtime update. That means with "store dos attributes = yes" on Solaris almost all files will get the current time as last modify time when being accessed. Very bad thing.

Is is feasible we check before and restore the mtime after changing EAs then?
Comment 1 Jeremy Allison 2012-02-08 18:51:34 UTC
That's ugly, and causes extra meta-data updates we really don't want to do in general code paths. Can we hide this inside the Solaris-specific EA code ?

Jeremy.
Comment 2 SATOH Fumiyasu 2012-03-25 20:13:03 UTC
I cannot reproduce your problem. I've confirmed the following
scenario on Solaris 10 10/06 (Update 3 + some patches) with UFS
and Solaris 10 9/10 (Update 9 + some patches) with ZFS.

  $ uname -a
  SunOS fmys-s10 5.10 Generic_142910-17 i86pc i386 i86pc
  $ date
  Mon Mar 26 05:08:37 JST 2012
  $ touch file.txt
  $ ls -l file.txt
  -rw-r--r--   1 fmys     fmys           0 Mar 26 05:08 file.txt
  $ runat file.txt mkfile 123 xattr.xxx
  $ ls -l file.txt
  -rw-r--r--   1 fmys     fmys           0 Mar 26 05:08 file.txt
  $ runat file.txt ls -l
  total 1
  -rw------T   1 fmys     fmys         123 Mar 26 05:09 xattr.xxx
Comment 3 SATOH Fumiyasu 2012-03-25 20:15:53 UTC
Fixed. Sorry...

  $ date
  Mon Mar 26 05:14:32 JST 2012
  $ touch -r /etc/passwd file.txt
  $ ls -l file.txt
  -rw-r--r--   1 root     root           0 Jun  7  2011 file.txt
  $ runat file.txt mkfile 123 xattr.xxx
  $ ls -l file.txt
  -rw-r--r--   1 root     root           0 Jun  7  2011 file.txt
  $ runat file.txt ls -l
  total 1
  -rw------T   1 root     root         123 Mar 26 05:14 xattr.xxx
Comment 4 Björn Jacke 2012-03-26 09:31:02 UTC
a customer had that problem on a Solaris 10 system with UFS. I currently don't have such a system availbale for testing. But thanks for your testing, in case it was broken this way it seems to have been fixed. So I guess you also don't have any issues when setting "store dos attributes = yes" on your setup?
Comment 5 SATOH Fumiyasu 2012-03-26 17:51:57 UTC
I've confirmed that file mtime is NOT updated when the extended
attribute "user.DOSATTRIB" is updated from Windows 7 via smbd.
My smb.conf have "store dos attributes = yes" and the client
user have write privilege to xattr.
Comment 6 Björn Jacke 2012-08-13 13:18:31 UTC
confirmed.