The pstore filesystem still creates duplicate filename/inode pairs for some pstore types. Add the id to the filename to prevent that. Before patch: [/sys/fs/pstore] ls -li total 0 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi After: [/sys/fs/pstore] ls -li total 0 1232 -r--r--r--. 1 root root 148 Sep 29 17:09 console-efi-141202499100000 1231 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi-141202499200000 1230 -r--r--r--. 1 root root 148 Sep 29 17:44 console-efi-141202705400000 1229 -r--r--r--. 1 root root 67 Sep 29 17:44 console-efi-141202705500000 1228 -r--r--r--. 1 root root 67 Sep 29 20:42 console-efi-141203772600000 1227 -r--r--r--. 1 root root 148 Sep 29 23:42 console-efi-141204854900000 1226 -r--r--r--. 1 root root 67 Sep 29 23:42 console-efi-141204855000000 1225 -r--r--r--. 1 root root 148 Sep 29 23:59 console-efi-141204954200000 1224 -r--r--r--. 1 root root 67 Sep 29 23:59 console-efi-141204954400000
Unified · Split
| @@ -320,10 +320,10 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count, · 319 unmodified lines | |||
| 320 | compressed ? ".enc.z" : ""); | 320 | compressed ? ".enc.z" : ""); |
| 321 | break; | 321 | break; |
| 322 | case PSTORE_TYPE_CONSOLE: | 322 | case PSTORE_TYPE_CONSOLE: |
| 323 | sprintf(name, "console-%s", psname); | 323 | sprintf(name, "console-%s-%lld", psname, id); |
| 324 | break; | 324 | break; |
| 325 | case PSTORE_TYPE_FTRACE: | 325 | case PSTORE_TYPE_FTRACE: |
| 326 | sprintf(name, "ftrace-%s", psname); | 326 | sprintf(name, "ftrace-%s-%lld", psname, id); |
| 327 | break; | 327 | break; |
| 328 | case PSTORE_TYPE_MCE: | 328 | case PSTORE_TYPE_MCE: |
| 329 | sprintf(name, "mce-%s-%lld", psname, id); | 329 | sprintf(name, "mce-%s-%lld", psname, id); |