.. | .. |
---|
62 | 62 | * Slots are requested and waited for, |
---|
63 | 63 | * the wait times out after slot_timeout_secs. |
---|
64 | 64 | * |
---|
| 65 | + * What: /sys/fs/orangefs/cache_timeout_msecs |
---|
| 66 | + * Date: Mar 2018 |
---|
| 67 | + * Contact: Martin Brandenburg <martin@omnibond.com> |
---|
| 68 | + * Description: |
---|
| 69 | + * Time in milliseconds between which |
---|
| 70 | + * orangefs_revalidate_mapping will invalidate the page |
---|
| 71 | + * cache. |
---|
| 72 | + * |
---|
65 | 73 | * What: /sys/fs/orangefs/dcache_timeout_msecs |
---|
66 | 74 | * Date: Jul 2016 |
---|
67 | 75 | * Contact: Martin Brandenburg <martin@omnibond.com> |
---|
.. | .. |
---|
222 | 230 | slot_timeout_secs); |
---|
223 | 231 | goto out; |
---|
224 | 232 | } else if (!strcmp(attr->attr.name, |
---|
| 233 | + "cache_timeout_msecs")) { |
---|
| 234 | + rc = scnprintf(buf, |
---|
| 235 | + PAGE_SIZE, |
---|
| 236 | + "%d\n", |
---|
| 237 | + orangefs_cache_timeout_msecs); |
---|
| 238 | + goto out; |
---|
| 239 | + } else if (!strcmp(attr->attr.name, |
---|
225 | 240 | "dcache_timeout_msecs")) { |
---|
226 | 241 | rc = scnprintf(buf, |
---|
227 | 242 | PAGE_SIZE, |
---|
.. | .. |
---|
276 | 291 | goto out; |
---|
277 | 292 | } else if (!strcmp(attr->attr.name, "slot_timeout_secs")) { |
---|
278 | 293 | rc = kstrtoint(buf, 0, &slot_timeout_secs); |
---|
| 294 | + goto out; |
---|
| 295 | + } else if (!strcmp(attr->attr.name, "cache_timeout_msecs")) { |
---|
| 296 | + rc = kstrtoint(buf, 0, &orangefs_cache_timeout_msecs); |
---|
279 | 297 | goto out; |
---|
280 | 298 | } else if (!strcmp(attr->attr.name, "dcache_timeout_msecs")) { |
---|
281 | 299 | rc = kstrtoint(buf, 0, &orangefs_dcache_timeout_msecs); |
---|
.. | .. |
---|
818 | 836 | static struct orangefs_attribute slot_timeout_secs_attribute = |
---|
819 | 837 | __ATTR(slot_timeout_secs, 0664, sysfs_int_show, sysfs_int_store); |
---|
820 | 838 | |
---|
| 839 | +static struct orangefs_attribute cache_timeout_msecs_attribute = |
---|
| 840 | + __ATTR(cache_timeout_msecs, 0664, sysfs_int_show, sysfs_int_store); |
---|
| 841 | + |
---|
821 | 842 | static struct orangefs_attribute dcache_timeout_msecs_attribute = |
---|
822 | 843 | __ATTR(dcache_timeout_msecs, 0664, sysfs_int_show, sysfs_int_store); |
---|
823 | 844 | |
---|
.. | .. |
---|
861 | 882 | static struct attribute *orangefs_default_attrs[] = { |
---|
862 | 883 | &op_timeout_secs_attribute.attr, |
---|
863 | 884 | &slot_timeout_secs_attribute.attr, |
---|
| 885 | + &cache_timeout_msecs_attribute.attr, |
---|
864 | 886 | &dcache_timeout_msecs_attribute.attr, |
---|
865 | 887 | &getattr_timeout_msecs_attribute.attr, |
---|
866 | 888 | &readahead_count_attribute.attr, |
---|